I migrated to Android studio, everything seemed ok up until I tried to run the app. It got stuck in the Launcher activity and then crashed, printing:
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoSuchMethodError: No direct method <init>(ILjava/lang/String;)V in class Lcom/google/android/gms/common/api/Status; or its super classes (declaration of 'com.google.android.gms.common.api.Status' appears in /data/data/com.MY PACKAGE/files/instant-run/dex/slice-google-play-........b-classes.dex)
at com.google.android.gms.measurement.zza.<init>(Unknown Source)
at com.google.android.gms.measurement.zza.zzaR(Unknown Source)
at com.google.android.gms.measurement.internal.zzn.zziJ(Unknown Source)
at com.google.android.gms.measurement.internal.zzz.zza(Unknown Source)
at com.google.android.gms.measurement.internal.zzw.<init>(Unknown Source)
at com.google.android.gms.measurement.internal.zzaa.zzDj(Unknown Source)
at com.google.android.gms.measurement.internal.zzw.zzaT(Unknown Source)
at com.google.android.gms.measurement.AppMeasurementContentProvider.onCreate(Unknown Source)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1759)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1728)
at android.app.ActivityThread.installProvider(ActivityThread.java:5534)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5105)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5045)
at android.app.ActivityThread.access$1600(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1459)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:168)
at android.app.ActivityThread.main(ActivityThread.java:5845)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
For me it was the Problem, that the versions of different of my play service dependencies differed, like
dependencies {
compile 'com.google.android.gms:play-services-gcm:8.4.0' /different version
compile 'com.google.android.gms:play-services-maps:9.0.2'
compile 'com.google.android.gms:play-services-location:9.0.2'
}
should be changed to
dependencies {
compile 'com.google.android.gms:play-services-gcm:9.0.2'
compile 'com.google.android.gms:play-services-maps:9.0.2'
compile 'com.google.android.gms:play-services-location:9.0.2'
}
I hope it works for you or somebody running into the same issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With