6

Before signing APK, Google Login was working fine. After signing APK, it's not working, always failure.

For that, are there any proguard settings that I have to do?

My SHA1 and all credentials are fine but still not working how to solve?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Rakul
  • 109
  • 1
  • 4

5 Answers5

14
  1. Go to the Google live play store account.
  2. Select your app.
  3. Select App signing tab in left side
  4. Copy both App signing certificate and Upload certificate's SHA 1 key.
  5. Then go to google Api console or firebase developer console --> then select your project.

FireBase: 1.Project over view --> project settings(setting icon right side) 2.Click on the Project settings then add your fingerPrint(SHA 1 Key which you had copied from Google live play store account).

Google Api Developer Console: Select your project. Click credentials tab on left side bar. Then select your api Key then click edit icon right side. Then add your SHA1 key. That's all.

monmonja
  • 2,203
  • 5
  • 22
  • 33
Mainak Devsinha
  • 169
  • 1
  • 6
2

Finally i was created new key based on release SHA1, now google login and maps working fine after signed apk , no need to run keytool commands, in android studio takes care of everything. you have to follow steps that it.

Android Studio2.1.1 File->Project Structure->app(Left hand side)

->Signing(on top side)->(Click on green color + button and add your release keystore details) ->Build Types(next to the signing tap) and select release on left hand side then right hand side you will see the some fileds in that choose signing config to release then click ok.

Finally click Gradle tap right hand side, then Project name->project name->Tasks->android->singingReport(click on that) now your debug key and Release key was ready On RUN console check it

Rakul
  • 109
  • 1
  • 4
1

That might be because you've added SHA1 of only debug keystore.

Add another SHA1 of production keystore and it will start working.
If you're using Linux of Mac OS, generate SHA1 like this.

keytool -list -v -keystore YOUR_PRODUCTION_KEYSTORE_PATH -alias androidproductionkey -storepass password -keypass password

For windows following should work.

keytool -list -v -keystore "YOUR_PRODUCTION_KEYSTORE_PATH" -alias androidproductionkey -storepass password -keypass password
Alok Patel
  • 7,842
  • 5
  • 31
  • 47
0

It is better that you add one more OAuth key in the API Console, so that you end up having two OAuth ids, one with debug key SHA1 fingerprint and other with the release key SHA1.

This way, both your debug and release APK files will continue to work.

jaibatrik
  • 6,770
  • 9
  • 33
  • 62
0

Just in case anyone made the same mistake as me regarding signing with incorrect keystore/file/password in the APK generator/wizard, see my answer at https://stackoverflow.com/a/45631945/1145905

kip2
  • 6,473
  • 4
  • 55
  • 72