Exception com.google.android.gms.common.api.ApiException: 12500

别说谁变了你拦得住时间么 提交于 2019-12-11 15:55:54

问题


Google sign in giving API exception with status code as 12500. Tried to set SHA-1 key but still giving exception.

The result in onActivityResult is coming null and showing this exception:

com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(Unknown Source)

Is there any possible way out for this issue as I am not getting any solution.

Thanks in advance.


回答1:


I think the error came from the Wrong SHA1. Please don't forget that the SHA1 is different between release and debug mode in the android studio. Instead of using toolkey export to get the SHA1, you can use gradle project -> Task -> android -> signingReport in the android studio (can open it by menu View -> Toolwindow -> gradle ) to get release and debug SHA1. After that, for easy working, you need to create 2 separate credentials with two SHA1 on google cloud console (google just instruct to create 1 using release SHA1, when we develop it will not work since it uses the debug SHA1).




回答2:


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



来源:https://stackoverflow.com/questions/53094767/exception-com-google-android-gms-common-api-apiexception-12500

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!