简体   繁体   English

异常com.google.android.gms.common.api.ApiException:12500

[英]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: 我最近在一个项目中解决了这个问题,可能的原因如下:

  • 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 . 如果使用Google身份验证,则必须在Firebase控制台Google Developer控制台这两个控制台上包含调试和发布密钥库的SHA1值。
  • After completing above step download a latest google.json file fron firebase console and add that file into your project. 完成上述步骤后,从Firebase控制台下载最新的google.json文件,并将该文件添加到您的项目中。

Your 12500 error will be resolved 您的12500错误将得到解决

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 com.google.android.gms.common.api.ApiException: 12500 - com.google.android.gms.common.api.ApiException: 12500 Google 登录引发异常 com.google.android.gms.common.api.ApiException: 12500 - Google Sign In throws an exception com.google.android.gms.common.api.ApiException: 12500 未处理的异常:PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null) - Unhandled Exception: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null) com.google.android.gms.common.api.ApiException:12500,在Google的Android Firebase项目中登录 - com.google.android.gms.common.api.ApiException: 12500, in android firebase project in google sign in Android Google 登录失败 com.google.android.gms.common.api.ApiException: 12500 - Android Google Sign In Failed com.google.android.gms.common.api.ApiException: 12500 安全网:com.google.android.gms.common.api.ApiException:16: - SAFETYNET : com.google.android.gms.common.api.ApiException: 16: com.google.android.gms.common.api.ApiException: 16: - com.google.android.gms.common.api.ApiException: 16: com.google.android.gms.common.api.ApiException:8: - com.google.android.gms.common.api.ApiException: 8: com.google.android.gms.common.api.ApiException: 10: - com.google.android.gms.common.api.ApiException: 10: com.google.android.gms.common.api.ApiException: 10 - com.google.android.gms.common.api.ApiException: 10
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM