'PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null) - Even though SHA1 and SHA256 has bee registers

I'm trying to implement google sign in, in my app, and i'm getting this error when im running-

Code-

final GoogleSignInAccount? acc= GoogleSignIn().signIn();

Error-

PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null)

Upon digging deeper into this, I've come to know that this happens when the firebase project has not bbeen signed with a SHA1 and ShA256 fingerprint. However, I had already signed it with an SHA1 print. Then I also put in the SHA256 and redownloaded the google-services.json and it still doesn't work-

enter image description here

How do I fix this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source