- (Optional) Change version (release) label that is shown at the app to the user. That will help us tracking the production version and confirming that current release is successfully shipped to production. I store version name in the values strings xml file. Instead of counting and incrementing the release number (like 1.2, 1.4 etc) I merely put the date of the last release in its name like "Release of 05/25/2021". This simplifies tracking. E. g. in git commits apart from the commit code (which gives no sense because it is a random symbols hash) the key information about the commit to track is its date. Once release name is changed in strings file, it is populated to the "About" menu section result of the app. Also I make a reference to the version name at the main Activity which is the login Activity of the app. So we see right at the start of the app that the proper version is launched
- Change version code.
- To find it faster, in Android Studio choose menu Edit -> Find -> Find in Path -> search "versionCode" keyword.
- 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.
- 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.
- 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.
- Wait until upload finishes. If doing for the first time, usually it highlights some errors in red on the web page. Well, 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,
- 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 :)
Might be like the following:
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.
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").
Problems with signing keys, when Google Play requires to sign the app with the initial key while I signed it with the different key. See this stackoverflow answer.
Google often updates its interfaces. So if something is not relevant anymore, please curse me in the comments below :)