[英]Exception com.google.android.gms.common.api.ApiException: 12500
Google sign in giving API exception with status code as 12500. Tried to set SHA-1 key but still giving exception. Google登录后给了API异常,状态码为12500。尝试设置SHA-1密钥,但仍给出异常。
The result in onActivityResult
is coming null and showing this exception: onActivityResult
的结果为null并显示此异常:
com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(Unknown Source)
com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(未知来源)
Is there any possible way out for this issue as I am not getting any solution. 我没有任何解决办法,因此有什么可能的解决方法。
Thanks in advance. 提前致谢。
I think the error came from the Wrong SHA1. 我认为错误来自错误的SHA1。 Please don't forget that the SHA1 is different between release and debug mode in the android studio.
请不要忘记,在Android Studio中,SHA1在发布和调试模式之间是不同的。 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.
您可以在Android Studio中使用gradle项目-> Task-> android-> signingReport(可以通过菜单View-> Toolwindow-> gradle来打开它)来获取发布和调试SHA1,而不是使用工具键导出来获取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).
之后,为了便于工作,您需要在Google云控制台上使用两个SHA1创建2个单独的凭据(Google只是指示使用发行版SHA1创建1个凭证,而在我们开发时由于使用调试SHA1而无法使用它)。
I recently resolved this issue in one of my projects and the possible reasons are below: 我最近在一个项目中解决了这个问题,可能的原因如下:
Your 12500 error will be resolved 您的12500错误将得到解决
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.