我来自com.google.firebase.provider.FirebaseInitProvider.zza(未知来源)

时间:2017-08-04 07:02:21

标签: android

这是一个错误,我得到了     java.lang.NoSuchMethodError:没有静态方法zzb(Ljava / lang / Object; Ljava / lang / Object;)Ljava / lang / Object;在课堂Lcom / google / android / gms / common / internal / zzac;

=============================================== =======================

在我的代码中

compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.google.android.gms:play-services-gcm:10.0.1'
compile 'com.android.support:support-annotations:25.1.0'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:support-v4:25.1.0'

1 个答案:

答案 0 :(得分:-1)

由于Google更新问题,一旦您更改为gradle文件,它将执行正常,如下所述

compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.google.android.gms:play-services-gcm:10.0.1'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:support-annotations:25.1.0'

将Gradle文件更改为

compile 'com.google.android.gms:play-services-auth:**11.0.4**'
compile 'com.google.android.gms:play-services-gcm:**11.0.4**'
compile 'com.google.android.gms:play-services:**11.0.4**'
compile 'com.android.support:support-annotations:**25.3.1**'
compile 'com.android.support:support-v4:**25.3.1**'
compile 'com.android.support:appcompat-v7:**25.3.1**'