How to sign your app using the upload key

Viewed 23718

I'm trying to publish my app to Google playstore, and I can not figure out how to sign the app use the upload key, as stated in https://developer.android.com/studio/publish/app-signing.html

I use Android Studio, and I signed the apk use Build -> generate signed APK, and created my own key at my own key store path/file. Now, to do the release, I need to use the google upload key, which confused me. So,

  1. where can I find my upload key in Google Play Console? Under App signing of this app, I can see Upload certificate of MD5, SHA-1, SHA-256 and even download a upload.pem file. What do I do with it?

  2. then exactly how do I use the Build -> generate signed APK in Android Studio to sign it with this so-called upload key?

My app uses google sign in to authenticate users. Right now it works if I just install my own apk. But if I download it from google store, it can not do the google authentication, for which I assume I screwed up the publication procedure.

FYI, I'm using the "Use Google Play App Signing" process.

Please help.

5 Answers

If google is signing your app for your, you'll have to use the SHA from the google play store. In your Google Play Console, Go into Release Management and App Signing.

From the section App signing certificate, grab the SHA-1 certificate fingerprint value (do not grab the SHA1: part):

11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE

and use it in this command

echo "11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE" | xxd -r -p | openssl base64

it should give you your hash

Related