After installing this library, my app crashes immediately with the following error:
E/AndroidRuntime: FATAL EXCEPTION: main
E/AndroidRuntime: Process: com.freezetag, PID: 4658
E/AndroidRuntime: java.lang.NoSuchMethodError: No static method zzy(Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzx; or its super classes (declaration of 'com.google.android.gms.common.internal.zzx' appears in /data/app/com.freezetag-1/base.apk)
E/AndroidRuntime: at com.google.android.gms.measurement.internal.zzt.zzaU(Unknown Source)
E/AndroidRuntime: at com.google.android.gms.measurement.AppMeasurementContentProvider.onCreate(Unknown Source)
E/AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1686)
E/AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1655)
E/AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5049)
E/AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:4644)
E/AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4584)
E/AndroidRuntime: at android.app.ActivityThread.access$1500(ActivityThread.java:148)
E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1353)
E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5310)
E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
I'm using version 0.4.3
compile "com.google.android.gms:play-services-base:8.4.0"
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.maps.android:android-maps-utils:0.4.3'
Strangely, when I downgrade play-services to 8.3.0, the app does not crash
Hi @joshblour - did you find a solution?
@kraenhansen - Nope
FYI, this is still very broke,
If anyone sees this and is very confused: I have to set everything explicitly to 8.3.0 in order to make it work.
literally search for :play-services and set all gradle stuff to that version, change any + to 8.3.0. That seems to help. Heavy-handed, but I can run my app again.
I have similar problem.
compile 'com.google.android.gms:play-services-maps:10.0.0'
I ended up having to rework my gradle to ignore the versions explicitly declared in them, and use the parent version of google-play services. I"ve learned when you see this, its almost always multiple version of google-play being included:
I'll show you what I mean:
set a variable like this:
ext.playServicesVer = '9.8.0'
then later on use the exclude group:
compile ('com.google.android.gms:play-services-base:'+playServicesVer)
compile ('com.google.android.gms:play-services-maps:'+playServicesVer)
compile (project(':react-native-maps')){
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
do this on every module that needs google-play services, and this tends to clear up.
Import every play services thing you need in the root project, exclude them in your dependencies.
My problem was solved with following code in android/app/build.gradle
compileSdkVersion 23
buildToolsVersion "23.0.1"
compile project(':react-native-maps')
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile "com.google.android.gms:play-services-base:+"
compile "com.google.android.gms:play-services-maps:+"
I write whole article about this problem:
https://medium.com/@suchydan/how-to-solve-google-play-services-version-collision-in-gradle-dependencies-ef086ae5c75f#.9l0u84y9t
Hope I helped you :)
Thanks @Nodonisko!
I'll close this for now.
@Nodonisko yep this is exactly the fix I was describing. I should have also mentioned that firebase is also affected too.
this fixed my issue, but now whenever I run react-native-link it's re-linking react-native-maps.. Has anyone noticed this? any way to workaround this?
settings.gradle

app/src/build.gradle

MainApplication.java

Edit: I noticed I can trick react-native link into skipping this with a multiline comment:
dependencies {
/*
compile project(':react-native-maps')
*/
compile(project(':react-native-maps')){
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
...
Most helpful comment
I write whole article about this problem:
https://medium.com/@suchydan/how-to-solve-google-play-services-version-collision-in-gradle-dependencies-ef086ae5c75f#.9l0u84y9t
Hope I helped you :)