com.google.android.gms.common.api.ApiException:app-debug.apk中为10

时间:2019-12-20 19:59:46

标签: android firebase google-login

我实现了google登录。当我从android studio中运行应用程序时,它可以正常运行。我生成了一个可在其他设备上调试的apk。现在,当我尝试使用Google登录时,出现以下错误:

 com.google.android.gms.common.api.ApiException: 10: 
    at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(com.google.android.gms:play-services-base@@17.1.0:4)
    at com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(Unknown Source:8)
    at com.bookaholic.shahad.bookaholicbd.activities.HomeActivity.onActivityResult(HomeActivity.java:190)
    at android.app.Activity.dispatchActivityResult(Activity.java:7638)
    at android.app.ActivityThread.deliverResults(ActivityThread.java:4515)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:4563)
    at android.app.ActivityThread.-wrap21(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1779)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:7000)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

但是,如果我从Android Studio运行,则效果很好。我在我的Firebase项目中添加了SHA-1指纹和程序包名称。谁能帮我吗?

0 个答案:

没有答案