I have problems with standard Google SignIn: after build a release of my android application Google SignIn doesn’t work.
I followed the guide as explained here to build a release:
https://developer.android.com/studio/publish/app-signing.html
Then, I go to google API console and I create a new client OAuth 2.0 using private key:
SHA1 is generated with
keytool -exportcert -keystore MY_PATH_TO_PRIVATE_KEY -list -v
Password of my keystore is requested and then I see SHA1.
I think this procedure is the right one, because I used the same for Facebook Login and it works.
I’m using the latest version of Android Studio.
Have I to add some in Gradle Config or in Android Manifest?
2
Answers
Finally solved it. I added the SHA1 key for my release key (the .jks file) in the Google Developers Console under the project registered. In Android Studio, at the left side, there is an option for Build variants under the project view. There, I changed each module to release mode (it is in debug mode by default). Then created the Signed APK by usual method, and run the app. The Google Signin worked perfectly.
Steps to locate the SHA-1 key:
1) Go to your Google Play Console
2) Select the targeting app
3) Go to “App signing” under “Release management”
4) The SHA-1 key can be found under “App Signing Certificate”
5) Update that key in your credential page