Steps
- Apply android:visible="false" option to the code (e. g. menu items) that was needed for debug purposes only.
- Change version code.
- To find it faster, in Android Studio choose menu Edit -> Find -> Find in Path -> search "versionCode" keyword. Or press Ctrl+Shift+F.
- Change versionCode in build.gradle file: increment it by +1. E. g. if the previous versionCode was 6, now it should be 7.
- (Optional) Change versionName right before the versionCode in the same file to the consequent similar value.
- Sync gradle files after changing the version name. Usually Android Studio suggests to sync in pop up menu after making any change in gradle files. If there is no pop up, just build the project again.
- Make (build) signed aab (or apk) file.
- Press in Android Studio menu: Build->Generate Signed Bundle/APK
- Go through all the windows by pressing "Next" and eventually "Finish" buttons. At the last step, choose "release" option.
- If Studio asks for the keystore path:
- It could be (at least on Linux) in ~/. android/debug. keystore. However, if we list wrong password for it or other wrong parameters, Studio won't successfully complete the release build.
- Try to find old key on our backups, say at Google Drive, and use it.
- Worst case: Instead, we can merely create a new keystore (there is a button for that). Than we need to specify new location and new keystore file name, and create password for that. The worst here is that for new key we need to sync it with Google Play Console.
- Wait until it is done.
- Once finished, Android Studio in the bottom right corner will show pop up (like Toast) message. Click on it, link "locate" allowing to locate the new file. Don't mess it up with the wrong location when uploading to Google Play Console. The location could be like "my_project_folder/app/release". There could be 2 files - aab and apk.
- The right one is the file that was last modified (see the "Modified" column in the File Explorer window).
- Upload the aab (or apk) file to Google Play Console.
- Go to Google Play Console.
- Click on the right app in the bottom of the screen.
- At the left panel, click "Production".
- In the top right, click "Create new release" button. Sometimes when we press "Create new release", close the web page and than reopen it again, the web page shows "Edit release" instead of "Create release". So press "Edit release" then.
- In the section "App bundles and APKs", upload the file of aab (or apk) created previously. Usually it is in the project_folder/app/release.
- Wait until upload finishes. If doing for the first time, usually it highlights some errors in red on the web page. Well, we need to fix them then.. See also "Common errors" section infra.
- In the right bottom part of the page, press "Save" button
- After saving, in the same right bottom of the page, press "Review release" button that became blue after saving.
- Finalize the release
- Should an error pop up at this stage,
- press "Edit release" button in the right bottom of the page.
See also the list of common errors below. - If there is no errors, press "Start to rollout" button in the same right bottom of the webpage.
- Unlike errors, sometimes there warnings highlighted in yellow (not in red). Usually it is due to excessive amount of code not used etc. For now we don't care about warnings and still can proceed.
- Wait until Google completes the app review
- From the main page of Google Play Console, go to your app in the bottom of the page.
- Click the "Production" tab on the left pane.
- Click the "Releases" section and see the status of the latest release. Immediately after uploading, the status will be "In review".
- However later Google will change it to "Available on Google Play". For the first time, review can take multiple days. Every next review is proceed faster though. Now we can download it from Google Play and check the production version :)
Common errors
If Studio does not explicitly tell, what goes wrong, open "Event Log" in the right bottom part of the Android Studio window.
So problems might be as follows:
Unrecognized languages
Problem:
Ready to send for review
If the app is stuck at this status, go to left pane -> Publishing overview -> submit for review again.
Unrecognized languages
Problem:
Your App Bundle targets the following unrecognized languages: us. The list of supported language codes can be found in the IANA registry. Invalid languages caused by third-party libraries can be excluded using the resConfigs Gradle property.
Solution:
Google per se suggests the solution with manually shrinking the language resources.
At the app-level buld.gradle file, we can specify explicitly which languages to use by including resConfigs property into the defaultConfig section:
There, we need to specify language not listed in the error text. E. g. if the error says "targets the following unrecognized languages: us" then in build.gradle I specify resConfig("ru").
Signing keys
Problem:
Problems with signing keys, when Google Play requires to sign the app with the initial key while I signed it with the different key.
FYI, at the Google Play Console, keys are located under "App integrity" menu:
So the idea is we use wrong key when building the release supra locally via Android Studio. This might happen when e. g. we started working from another computer and generated locally new key. The option here is to find our old key. I personally store it at Google Drive (though I admit it is not a best idea). Usually this file has "jks" extension. So we can download the old key from backup and then use it to build aab file via Android Studio (see supra "Make (build) signed aab (or apk) file" -> Press in Android Studio menu: Build->Generate Signed Bundle/APK). If the old key is not found, we can generate new one. Though it is more complicated because next we need to sync it with Google Play Console.
Conclusion
Google often updates its interfaces. So if something is not relevant anymore, please curse me in the comments below :)
No comments:
Post a Comment