2017-03-22 31 views
0

我是新的android工作室和這裏。應用程序不工作java.lang.NoSuchMethodError

我的應用程序不能在android模擬器上工作。它說應用程序停止。 當我看到Android的顯示器,我看到這個錯誤:

E/AndroidRuntime: FATAL EXCEPTION: main 
Process: com.ads.firebase, PID: 4296 
java.lang.NoSuchMethodError: No virtual method zzahj()Ljava/util/ArrayList;in class Lcom/google/android/gms/auth/api/signin/GoogleSignInOptions; or its super classes (declaration of 'com.google.android.gms.auth.api.signin.GoogleSignInOptions' appears in /data/app/com.raykos.firebase-1/split_lib_dependencies_apk.apk:classes32.dex) 
at com.google.android.gms.auth.api.Auth$3.zza(Unknown Source) 
at com.google.android.gms.auth.api.Auth$3.zzp(Unknown Source) 
at com.google.android.gms.common.api.GoogleApiClient$Builder.addApi(Unknown Source) 
at com.firebase.ui.auth.util.CredentialsAPI.initGoogleApiClient(CredentialsAPI.java:147) 
at com.firebase.ui.auth.util.CredentialsAPI.<init>(CredentialsAPI.java:65) 
at com.firebase.ui.auth.ui.ChooseAccountActivity.onCreate(ChooseAccountActivity.java:91) 
at android.app.Activity.performCreate(Activity.java:6679) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) 
at android.app.ActivityThread.-wrap12(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.app.ActivityThread.main(ActivityThread.java:6119) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 

我build.grande是:

compile fileTree(dir: 'libs', include: ['*.jar']) 
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 
compile 'com.google.firebase:firebase-database:10.0.1' 
compile 'com.android.support:customtabs:25.3.0' 
compile 'com.android.support:palette-v7:25.3.0' 
compile 'com.android.support:cardview-v7:25.3.0' 
compile 'com.firebaseui:firebase-ui:0.6.0' 
compile 'com.android.support:appcompat-v7:25.3.0' 
compile 'com.android.support.constraint:constraint-layout:1.0.2' 
compile 'com.google.firebase:firebase-core:10.0.1' 
compile 'com.android.support:support-vector-drawable:25.3.0' 
compile 'com.google.firebase:firebase-auth:10.0.1' 

testCompile 'junit:junit:4.12' 
compile 'com.android.support:design:25.3.0' 

回答

1

您必須使用一個版本FirebaseUI的是與其他火力地堡和谷歌播放兼容libaries。文檔中包含table of compatible versions。在你的情況下,你應該使用firebase-ui:1.1.1。

還要確保您的模擬器映像包含最新版本的Google Play服務。運行仿真設備時,您可以轉到設置>應用並選擇Google Play服務,以查看安裝的Google Play服務的版本。

+0

非常感謝你 –