Soubor jks je vždy je přidán do exportu aplikace, takže Google Play díky němu hned vidí, že jde opravdu o aktualizaci appky. Bez tohoto daného klíče appku nikdy nezaktualizují.
Když jsem soubor omylem smazal, trvalo mi týdny zjistit, že si musíme domluvit nový soubor. Tohle řešení mi tehdy napsali:
Create a New Upload Key in Android Studio
This process generates a new private key and keystore, which is the first step before requesting the reset.
- In Android Studio, go to Build > Generate Signed Bundle / APK....
- Select either Android App Bundle or APK and click Next.
- Under the Keystore section, click the Create new... button.
- Choose the Path: Click the folder icon next to Key store path to select a secure location to save your new keystore file (e.g., a location outside your project folder that you back up). Give it a filename, like
my-new-upload-key.jks. - Set Passwords: Create and confirm strong passwords for the keystore and for the key itself. It's crucial to store these passwords securely in a password manager.
-
- Alias: Create a short, memorable name for your key (e.g.,
upload). - Certificate: Fill in your organization's details. Only the "First and Last Name" field is required.
- Alias: Create a short, memorable name for your key (e.g.,
- Click OK. Android Studio will create the new
.jkskeystore file at the location you specified. - Backup Your Keystore: Immediately create a secure backup of this new
.jksfile and its passwords. Losing this key would require you to repeat this entire reset process again.
Ale jak se o novém klíči dozví Google Play?
- Follow the instructions in the Android Studio Help Center to generate a new key. It must be different from any previous keys, be a 2048-bit RSA key, and have 25-year validity. Alternatively, you can use the following command line to generate a new key:
- keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks
- Export the certificate for that key to PEM format:
- keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks
- Once you have generated a PEM file please follow the steps below on your Play Console:
a. Go to Setup (nebo Test and release) > App integrity >Play App Signing (Settings)
b. Request Upload key reset
c. Give a reason why you’re requesting a key reset
d. Enter PEM file
e. Click Request
We recommend that you adjust your planning to include a buffer period of 48 hours from when the upload key has been reset before you can use the new upload key.
Adresa https://play.google.com/console/u/1/developers/*/app/*/keymanagement. Zjistit celý postup reálně trvá týdny, tak si sem raději píšu postup.