异常com.google.android.gms.common.api.ApiException:12500 [英] Exception com.google.android.gms.common.api.ApiException: 12500

查看:442
本文介绍了异常com.google.android.gms.common.api.ApiException:12500的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google登录后将API赋予异常,其状态码为12500.尝试设置SHA-1密钥,但仍给出异常.

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

onActivityResult中的结果为空,并显示此异常:

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

com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(未知 来源)

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.

谢谢.

推荐答案

我认为该错误来自错误的SHA1.请不要忘记,在Android Studio中,SHA1在发布和调试模式之间是不同的.您可以在Android Studio中使用gradle项目-> Task-> android-> signingReport(可以通过菜单View-> Toolwindow-> gradle打开它)来获取发布和调试SHA1,而不是使用工具键导出来获取SHA1.之后,为了便于工作,您需要在Google云控制台上用两个SHA1创建2个单独的凭据(Google只是指示使用发行版SHA1创建1个凭证,而在我们开发时由于使用调试SHA1而无法使用它).

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).

这篇关于异常com.google.android.gms.common.api.ApiException:12500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆