2

i have two build flavours. Each have debug and release build types.

i having two googleservice.json for two build flavours. All are working fine except gmail login.

In local gmail login works fine. But after uploading app to playstore, gmail login not works. i update two sha1 key for debug and release in firebase console.and get the latest googleservice.json file.

But still facing issue on play store.

And i am having this in my proguard

-keep class com.google.android.gms.** { *; }

-dontwarn com.google.android.gms.**

And i m refering all your stackoverflow question but still not get a answer.

Thanks, Arunraj M

Community
  • 1
  • 1
Arunraj gm
  • 51
  • 1
  • 8

2 Answers2

2

Add the SHA1 key of 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.

follow this link Google sign in signed apk not working

and after adding SHA-1 Google Developers Console replace with google-services.json

NOTE: JSON file of google should only one in project

ND1010_
  • 3,743
  • 24
  • 41
  • 1
    After generate i manually install the apk.its works.But after upload to playstore it wont works – Arunraj gm May 31 '17 at 07:09
  • I have different build variant like stating,preproduction,production like etc.so each have different json file. – Arunraj gm May 31 '17 at 07:12
  • are you install release apk in your device? or after done changes of google-services.JSON file and install application through RUN application ? – ND1010_ May 31 '17 at 07:16
  • in sort i mean that the installed application is from this PATH := ../your drive/applicationNameFolder/app/app-release.apk – ND1010_ May 31 '17 at 07:19
  • I m install release apk via run the app in androidstudio.works good.And after generate the signed apk i manually install the apk like transfer apk to phone memory and install,works fine.Issue is only get the app from play store – Arunraj gm May 31 '17 at 07:19
  • @Arunrajgm: any luck on this ..im also facing this..i guess its with fcm..any solution let me know..thank you – AVINASH KANNA Aug 14 '17 at 06:05
1

The problem is you are using the debug sha1 keys You have to generate release SHA1 keys

In order to generate Release SHA1 first go to your JAVA JRE Bin folder and open command prompt there or directly open Command prompt and go to your JAVA JRE bin folder, for example: C:\Program Files (x86)\Java\jre7\bin>

Then use command below to generate release SHA1 keys,

keytool -list -v -keystore <keystore_path> -alias <alias_name>

Example:

My Keystore Path: D:\AndroidProjects\my_app_key_store.jks

My Alias Name: my_app_alias

Now use the command below to generate your own keytool path:

keytool -list -v -keystore D:\AndroidProjects\my_app_key_store.jks -alias my_app_alias
Hantash Nadeem
  • 458
  • 6
  • 10