4

This question already asked but I did not find any satisfactory answer.

I followed each and every step of https://developers.google.com/+/mobile/android/samples/quickstart-android#credentials-screenshot but instead of their package name I am using mine.

There are two cases one is direct testing and one after signin the apk with keystore.

When I am testing my app in that case signin with any google account working fine but after I generate my signed apk it is giving me Error signing in the specified account. Please choose a different account.

If everything is same then why it is not working with signed apk?

Pushpendra
  • 2,791
  • 4
  • 26
  • 49

1 Answers1

6

I found my mistake and it is SHA1 key, My debug SHA1 and keystore SHA1 are different and in google console I gave my debug SHA1 so it was working with debug apk but not with signed apk.

So what I did is I extracted SHA1 from my keystore and put that in google console now it is working for signed apk(it will not work with debug now). This is how you can extract SHA1 from keystore.

c:\Program Files\Java\jdk1.7.0_71\bin>keytool -list -v -keystore c:\you_key_here.key
Pushpendra
  • 2,791
  • 4
  • 26
  • 49
  • I'm following [this](https://developers.google.com/console/help/new/?hl=en_US#creating-android-api-keys) and executed **keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v** to have SHA1 and used same for setting project console, But same issue. ..any suggestion ! – CoDe Oct 12 '15 at 10:24
  • @Shubh are you able to login from degub apk? – Pushpendra Oct 12 '15 at 10:39
  • noo..I'm directly running it from my system as Debug app..and it's not working. I didn't try with release apk yet. – CoDe Oct 12 '15 at 10:41
  • @Shubh It should work with debug app because you are getting debug SHA-1. I think there is some problem in setting project console, like your app package name etc. – Pushpendra Oct 12 '15 at 11:03
  • yes I was using wrong key..I created API-Key and used it as meta-data. Thanks. – CoDe Oct 12 '15 at 11:15