在App上接google賬號登錄的過程中遇到如下報(bào)錯:
Exception com.google.android.gms.common.api.ApiException: 12500:
at com.google.android.gms.common.internal.zzb.zzz(Unknown Source)
at com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(Unknown Source)
at com.ewise.android.api.MainActivity.onActivityResult(SignInActivity.java:89) at android.app.Activity.dispatchActivityResult(Activity.java:7010)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4187)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4234)
at android.app.ActivityThread.-wrap20(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6316)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
解決辦法:
在firebase上對自己的應(yīng)用進(jìn)行如下配置志衣,如圖所示:
1.設(shè)置support email;
2.設(shè)置SHA-1的指紋秘鑰(至于SHA-1怎么生成的網(wǎng)上一大堆)
3.保證自己應(yīng)用里面的google-serices.json文件要是firebase上面最新下載下來的
參考鏈接:https://stackoverflow.com/questions/47632035/google-sign-in-error-12500