简体   繁体   中英

How to solve this GMS ApiExcpetion: Error Code 12500?

This is the exception I'm getting: com.google.android.gms.common.api.ApiException: 12500:

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    /* if (CallbackManagerImpl.RequestCodeOffset.Login.toRequestCode() == requestCode) {
        callbackManager.onActivityResult(requestCode, resultCode, data);
    }
    super.onActivityResult(requestCode, resultCode, data);*/
    if (requestCode == googleRequestCode) {
        //for google
        Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
        handleSignInResult(task);
    }

I recently resolved this issue in one of my projects and the possible reasons are below:

  • In case of google authentication, you must include your SHA1 values for your debug and release keystores on both consoles like Firebase console as well as Google developer console .
  • After completing above step download a latest google.json file fron firebase console and add that file into your project.

Your 12500 error will be resolved.

Credit goes to: Exception com.google.android.gms.common.api.ApiException: 12500

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM