4

I just upgraded my Android Studio Version from 2.1 to 2.2.2 and I also upgraded a bunch of other Google dependencies (play services and all support libraries) to version 25.0.0.

I also upgraded gradle version to 2.2.2 and compiledSdkVersion to 25.

Well, I just made everything as up to date as possible.

Now when I run my app, I suddenly get this very weird crash as soon as the app launches.

java.lang.NoSuchMethodError: No static method zzb(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzab; or its super classes (declaration of 'com.google.android.gms.common.internal.zzab' appears in /data/app/com.avantcar.a2go-1/base.apk:classes72.dex)
        at com.google.firebase.provider.FirebaseInitProvider.zza(Unknown Source)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
        at android.app.ActivityThread.installProvider(ActivityThread.java:5153)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
        at android.app.ActivityThread.-wrap1(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5417)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Has anyone seen this before and knows how to fix it?

Guy
  • 6,414
  • 19
  • 66
  • 136

3 Answers3

2

I also saw this since a couple days ago after updating my sdk. This works for me: Update your firebase library to version 10. You can do this by updating into these lines in build.gradle file:

compile 'com.google.firebase:firebase-core:10.0.0'
compile 'com.google.firebase:firebase-messaging:10.0.0'

You may have different firebase component on your project, so adjust accordingly.

But you can change the version to:

compile 'com.google.firebase:firebase-core:+'
compile 'com.google.firebase:firebase-messaging:+'
Sergio Tulentsev
  • 226,338
  • 43
  • 373
  • 367
1

compile 'com.google.android.gms:play-services:+' compile 'com.google.firebase:firebase-core:+'

The one that works for me

Pencilcheck
  • 2,664
  • 3
  • 25
  • 14
0

update all library versions and gms version as well . It will definitely work. Make sure all google services library you are using must be of same version

Apurva Aggarwal
  • 296
  • 3
  • 10