RuntimeExecutionException: com.google.android.gms.common.api.ApiException: 8 - PullRequest
0 голосов
/ 16 апреля 2019

Я создаю приложение для управления почтой Gmail, здесь я застрял при входе в систему / аутентификации

при входе в систему Кнопка вкл. Нажмите ниже код

startActivityForResult(mCredential.newChooseAccountIntent(), RC_SIGN_IN);

и получаю ошибку

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=121, result=-1, data=Intent { (has extras) }} to activity {.MainActivity}: com.google.android.gms.tasks.RuntimeExecutionException: com.google.android.gms.common.api.ApiException: 8: 
    at android.app.ActivityThread.deliverResults(ActivityThread.java:4398)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:4440)
    at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6718)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
 Caused by: com.google.android.gms.tasks.RuntimeExecutionException: com.google.android.gms.common.api.ApiException: 8: 
    at com.google.android.gms.tasks.zzu.getResult(Unknown Source:15)
    at .MainActivity.handleSignInResult(MainActivity.java:145)
    at .MainActivity.onActivityResult(MainActivity.java:139)
    at android.app.Activity.dispatchActivityResult(Activity.java:7462)
    at android.app.ActivityThread.deliverResults(ActivityThread.java:4391)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:4440) 
    at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49) 
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816) 
    at android.os.Handler.dispatchMessage(Handler.java:106) 
    at android.os.Looper.loop(Looper.java:193) 
    at android.app.ActivityThread.main(ActivityThread.java:6718) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
 Caused by: com.google.android.gms.common.api.ApiException: 8: 
    at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(Unknown Source:4)
    at com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(Unknown Source:6)
    at .MainActivity.onActivityResult(MainActivity.java:138)

Кто-нибудь знает причину или решение, пожалуйста?

...