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.
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).
I recently resolved this issue in one of my projects and the possible reasons are below:
Your 12500 error will be resolved
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.