提问者:小点点

尝试实现Android谷歌登录时出现错误代码 12500


所以我已经收到错误 12500 3 天了,我已经查看了每个可能的帖子来尝试解决错误。我已经更新了谷歌播放服务,更新了谷歌控制台以确保有支持链接,并添加了个人资料图片。我没有使用火力基地。我只是在使用谷歌控制台。当我创建GoogleSignInAccount帐户时,似乎发生了错误。

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    // Result returned from launching the Intent from GoogleSignInClient.getSignInIntent(...);
    if (requestCode == RC_SIGN_IN) {
        // The Task returned from this call is always completed, no need to attach
        // a listener.
        Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
        handleSignInResult(task);
    }
}

private void handleSignInResult(@NonNull Task<GoogleSignInAccount> completedTask) {
    try {
        GoogleSignInAccount account = completedTask.getResult(ApiException.class);
        String idToken = account.getIdToken();
        System.out.println(idToken);
        updateUI(account);
    } catch (Exception e) {
        e.printStackTrace();
        updateUI(null);
    }
}

W/System.err: com.google.android.gms.common.api.ApiException: 12500: at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(Unknown Source:4) at com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(Unknown Source:8) at edu.lehigh.cse216.phase0.ui.login.LoginActivity.onActivityResult(LoginActivity.java:90) at android.app.Activity.dispatchActivityResult(Activity.java:7454) at android.app.ActivityThread.deliverResults(ActivityThread.java:4353) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4402) at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) W/System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)


共1个答案

匿名用户

请遵循谷歌登录错误12500,第二个请阅读谷歌登录方法的最新文档。