如何在通过Firebase身份登录Google时修复“ com.google.android.gms.common.api.ApiException:12500”?

时间:2019-08-02 16:28:54

标签: java android firebase-authentication google-signin

我试图使用Firebase身份验证将Google登录集成到我的应用中,但是却收到“ com.google.android.gms.common.api.ApiException:12500”。我有简单的UI,并遵循文档。我的Google Play服务是最新的,但仍然出现错误。 我已经尝试了Stack Overflow上所有可用的解决方案,但是没有任何效果。 请帮我 预先感谢

我尝试过 1.以下文档 2.更新Google服务 3.添加SHA指纹 4.添加客户端ID 5.更新JSON文件

等级依赖

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-auth:11.6.0'
implementation 'com.google.android.gms:play-services-auth:11.6.0'

}

Java代码

Exactly Same from Documentation

错误

08-02 21:29:20.700 23656-23656/com.techtoall.adityarana.firebasetest W/EmailPassword: Google sign in failed
    com.google.android.gms.common.api.ApiException: 12500: 
        at com.google.android.gms.common.internal.zzb.zzz(Unknown Source:14)
        at com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(Unknown Source:47)
        at com.techtoall.adityarana.firebasetest.MainActivity.onActivityResult(MainActivity.java:84)
        at android.app.Activity.dispatchActivityResult(Activity.java:7634)
        at android.app.ActivityThread.deliverResults(ActivityThread.java:4622)
        at android.app.ActivityThread.handleSendResult(ActivityThread.java:4670)
        at android.app.ActivityThread.-wrap19(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1829)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:198)
        at android.app.ActivityThread.main(ActivityThread.java:7055)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:523)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:836)

0 个答案:

没有答案