I'm trying to make sense of how to upload an app onto Google Play while using Google Play App Signing.
Here is what I did:
- Created an app
- Used keytool.exe to generate a key for that app
- Uploaded the app to Google Play
- Enrolled in the Google Play App Signing
- Try to upload the app again without success.
It complains that the certificate is not the certificate
Upload new APK to Production
Upload failed You uploaded an APK that is not signed with the upload certificate. You must use the same certificate. The upload certificate has fingerprint: [ SHA1: 0C:... ] and the certificate used to sign the APK that you uploaded have fingerprint: [ SHA1: 2D:... ]
After searching for a while. I find out how to put the certificated posted on my Google Play console in my keystore. Something like this:
keytool.exe -importcert -file upload.pem -keystore myapp-release-key.keystore
The certificate seems to be in. When I list the contents of the keystore, here's what I get:
keytool.exe -list -keystore trackcoachfull-release-key.keystore Enter keystore password:
Keystore type: JKS Keystore provider: SUN
Your keystore contains 2 entries
myappfull, May 18, 2017, PrivateKeyEntry, Certificate fingerprint (SHA1): 2D:... uploadkey, May 19, 2017, trustedCertEntry, Certificate fingerprint (SHA1): 0C:...
Now, where I'm blocked...
In Android Studio, I try to generate a signed APK with the uploadkey.
Build > Generate Signed APK Select the keystore above Enter the keystore password Select the uploadkey as the key alias I'm force to enter a key password.
Error in Android Studio:
Error:Execution failed for task ':app:packageFullRelease'.
com.android.ide.common.signing.KeytoolException: Failed to read key uploadkey from store "C:\Users\Admin\AndroidStudioProjects\keystores\myappfull-release-key.keystore": trusted certificate entries are not password-protected
My question is this:
How do you generate an APK signed with an upload key provided by Google Play?
Thanks
myappfull
when building your apk.