2016-11-13 81 views
3

我刚刚将我的Android Studio版本从2.1升级到2.2.2,并且还将其他一些Google依赖项(播放服务和所有支持库)升级到版本25.0.0。NoSuchMethodError:没有静态方法zzb

我也升级版本的Gradle 2.2.2和compiledSdkVersion至25

好吧,我只是做了一切,最新越好。

现在,当我运行我的应用程序时,应用程序启动后突然发生这种非常奇怪的崩溃。

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) 

有没有人看过这个之前,知道如何解决它?

+0

只是为了确认,是有问题的应用程序调试或发布版本(或别的?) – clownba0t

+0

@ clownba0t这发生了,当我试图运行调试版本直接从Android Studio。 – Guy

+0

您是否尝试过清洁和重建项目? – clownba0t

回答

2

我在更新我的sdk之后几天前也看到了这个。这个工作对我来说: 更新您的火力库到版本10,您可以通过更新到这些行build.gradle文件做到这一点:

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

你可能对你的项目不同的火力点组成部分,因此相应的调整。

但你可以将版本更改为:

compile 'com.google.firebase:firebase-core:+' 
compile 'com.google.firebase:firebase-messaging:+' 
+0

+工作方式,但如果我指定任何版本,它将无法正常工作。我也需要为gcm做这个。 – Pencilcheck

1

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

,对我

0

更新所有库版本的作品和GMS版本,以及该之一。它一定会奏效。确保你使用的所有谷歌服务库必须是相同的版本

相关问题