Closed vdias38 closed 8 years ago
This exception is caused by inconsistant Google Play Services and Android Support library versions. Try updating your Android SDK.
the apk was not build on local but on build.phonegap.com environment. Do you know if a ticket was open to build.phonegap community about it ? It should occur to many people.
It is not good if you cannot control build environment. The only option is to wait until Adobe will update Android SDK on their servers. The 5.0.3 version of this plugin in a fact uses exact versions of Google libraries (which appeared not to be a great idea). If you still get the error above then probably some other plugin references latest Android support library or it was referenced by Android project itself through com.android.support:appcompat-v7.
More details here: https://developers.google.com/android/guides/releases
Looks like Google broke 9.0 and fixed this in 9.0.1
PGB has deployed the latest Android SDK the 30th May but the issue remains. On build logs it seems that the last v4 (v4:24 beta1) android support lib is used:
:prepareComAndroidSupportSupportV42400Beta1Library
:prepareComGoogleAndroidGmsPlayServicesBase840Library
:prepareComGoogleAndroidGmsPlayServicesBasement840Library
:prepareComGoogleAndroidGmsPlayServicesGcm840Library
:prepareComGoogleAndroidGmsPlayServicesLocation840Library
:prepareComGoogleAndroidGmsPlayServicesMaps840Library
:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library
:prepareComPushwooshPushwoosh412Library
I've checked that only pushwoosh plugin references android support
$ grep -r com.android.support plugins
My device run Google Play services 9.0.83 and I used pushwoosh plugin 5.1.2 on cordova-android 4.1.1
For information, phonegap-plugin-push has updated its push.gradle to fix this issue:
...
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:23.4.0'
}
}
PGB has deployed the latest Android SDK the 30th May but the issue remains.
They have to do it again to check out latest 9.0.1 and 9.0.2 google play services which are compatible with android support v4:24 beta1.
I've checked that only pushwoosh plugin references android support
android support v4 is also automatically referenced by com.google.android.gms:play-services-location and com.android.support:appcompat-v7.
For information, phonegap-plugin-push has updated its push.gradle to fix this issue:
... configurations.all { resolutionStrategy { force 'com.android.support:support-v4:23.4.0' } }
It is not a good idea. It may result in various problems and conflicts with other plugins.
I've opened an issue to phonegap build support: All my recent Android build crash, since deploy of Google Play Services 9.x
The crash occurs on the exact moment the App registerDevice. If I hide the call to this function the App run normally. It's why I've dismissed other origin.
I can't find any release note of Google Play services 9.0.1 | 9.0.2. How to know compatibility issues between Google Play Services and android support lib ?
@elbidone we need a fix from Google. In the meantime you can do what I've done for the phonegap-plugin-push https://github.com/phonegap/phonegap-plugin-push/issues/909
@macdonst I will test the workaround you've suggested, but it not solves the issue on build.phonegap (or I should do a fork and update my config.xml to use my fork instead npm package,... hum)
As you suggested @macdonst I've added following lines on push.gradle and it works!
Thanks a lot!!
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:23.4.0'
}
}
I can't find any release note of Google Play services 9.0.1 | 9.0.2. How to know compatibility issues between Google Play Services and android support lib ?
https://developers.google.com/android/guides/releases
- Google Play services updated to 9.0.1
The Google Play services version 9.0.1 release is now available. This release fixes the following issues with the version 9.0.0 release:
- Fixes a class change compilation error with ContextCompat.getNoBackupFilesDir().
pushwoosh plugin crash Android App on register, tested on:
See device logs below: