build failed when cordova-diagnostic-plugin@3.6.7 is installed
iwan-uschka opened this issue · 11 comments
cordova-android-support-gradle-release@0.0.2
works fine with cordova-diagnostic-plugin@3.6.7
.
But using cordova-android-support-gradle-release@1.0.0
and cordova-diagnostic-plugin@3.6.7
returns in an error when building the app:
/platforms/android/build/intermediates/res/merged/debug/values-v26/values-v26.xml:15: error: Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
The latest release version of the support library is v26, so cordova-android-support-gradle-release@1.0.0
has been bumped to point at this by default, whereas cordova-android-support-gradle-release@0.0.2
is set to v25.
However, v1.0.0 also adds the ability to specify a version using a plugin variable, so in your case you probably want:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=25.+
I finally got this working by installing and configuring the plugin within the config.xml like this:
<plugin name="cordova-android-support-gradle-release" spec="cordova_plugins/cordova-android-support-gradle-release" version-comment-only="1.0.0">
<variable name="ANDROID_SUPPORT_VERSION" value="25.+"/>
</plugin>
Thanks for that hint and thank you in general for your work on these great plugins.
In this case you could tell me that "25.+" is the version to define here. What about other plugins. Is there a way to automatically find the correct version of all plugins? Should it be the smallest?
Is it a good idea to install cordova-android-support-gradle-release
and cordova-android-play-services-gradle-release
anyway to be prepared for version clashes?
Is it a good idea to install
cordova-android-support-gradle-release
andcordova-android-play-services-gradle-release
anyway to be prepared for version clashes?
This is up to you, but I would only install them if they are necessary to fix a version clash - no point in installing plugins you don't need.
Good point :)
Thank You!!
ok so whats the final solution here? what can i use..
i have the problem that i got the same build error before i installed this plugin. i have the diagnostic plugin too. should i use a custom version or the default version to fix my problem
@cagdas88 did you install this plugin with ANDROID_SUPPORT_VERSION=25.+
?
Also, depends which other plugins you have installed in the project: if you have others which use Gradle classes (rather than strings) such as cordova-plugin-fcm
or phonegap-plugin-push
then this plugin is unable to override those versions and won't be of help (see here)
You, sir, are the man, I have been trying to figure out my issue for a few weeks now!
I have diagnostic and firebase
what should I do ?
I have this android:keyboardNavigationCluster error as well when including
<plugin name="cordova.plugins.diagnostic" spec="~3.7.1" source="npm" />
when I add
<plugin name="cordova-android-support-gradle-release" spec="cordova_plugins/cordova-android-support-gradle-release" version-comment-only="1.0.0">
<variable name="ANDROID_SUPPORT_VERSION" value="25.+"/>
</plugin>
I have this error
Failed to fetch plugin https://github.com/cordova_plugins/cordova-android-support-gradle-release via git.
Either there is a connection problems, or plugin spec is incorrect:
Error: git: Command failed with exit code 128 Error output:
Cloning into '/tmp/git/1512072171842'...
Same problem with
<plugin name="cordova.plugins.diagnostic" spec="~3.6.8" source="npm" />
Fetching plugin "cordova.plugins.diagnostic@~3.6.8" via npm
Installing "cordova.plugins.diagnostic" at "3.6.8" for android
Subproject Path: CordovaLib
"plugman install --platform android --project /project --plugin https://github.com/cordova_plugins/cordova-android-support-gradle-release --nohooks=.": Fetching plugin "https://github.com/cordova_plugins/cordova-android-support-gradle-release" via git clone
Cloning full repository
Failed to fetch plugin https://github.com/cordova_plugins/cordova-android-support-gradle-release via git.
Either there is a connection problems, or plugin spec is incorrect:
Error: git: Command failed with exit code 128 Error output:
Cloning into '/tmp/git/1512075277759'...
fatal: could not read Username for 'https://github.com': No such device or address
I was getting this error
/platforms/android/build/intermediates/res/merged/debug/values-v26/values-v26.xml:15: error: Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
I just downgrade these two plugins to resolve build fail issue
cordova.plugins.diagnostic from @4.x to @3.6.7
cordova-android-support-gradle-release from @1.4.x to @1.0.0
with ANDROID_SUPPORT_VERSION=v25.+