Sub topic 12
Publishing to Google Play testing tracks and production
This chapter assumes you can already build a signed App Bundle (flutter build appbundle --release), that your app has a stable application ID, and that you understand version name and build number from the versioning chapter. Here you move that bundle through Google Play Console, from a first internal test to a staged production rollout.
How Play Console organizes releases
Google Play does not publish a build directly to all users. You upload an App Bundle to a track, and the track decides who can install it. Each track has its own list of releases, and a build on one track does not appear on another until you promote it.
| Track | Audience | Review | Typical use |
|---|---|---|---|
| Internal testing | Up to 100 testers you list by email | Usually available within minutes | Smoke tests of each CI build |
| Closed testing | Testers in email lists or Google Groups | Reviewed by Google | QA team, beta groups |
| Open testing | Anyone who opts in on the Play Store listing | Reviewed by Google | Public beta |
| Production | All users in the countries you choose | Reviewed by Google | Public release |
Open testing is optional. Many teams go from closed testing straight to production.
Before the first upload
Create the app in Play Console and fill in the required setup before any track accepts a release. The exact checklist changes over time, so follow the dashboard tasks it shows you. Expect these items:
- The app name, default language, and whether it is an app or a game, free or paid.
- A privacy policy URL, the content rating questionnaire, the target audience declaration, and the Data safety form.
- A store listing with a short description, a full description, an icon, and screenshots.
Internal testing needs less of this than production does. Complete the production items before you plan your launch date, because they are the usual cause of delays.
Play App Signing
New apps are enrolled in Play App Signing. Google holds the final app signing key and re-signs the APKs it delivers. You sign your bundle with the upload key from the signing chapter. If you lose the upload key, you can ask Google to reset it. If you lose a key you managed yourself outside Play App Signing, you cannot publish updates to that app.
The application ID is permanent. Play identifies an app by it, so check applicationId in android/app/build.gradle.kts before your first upload.
Uploading a bundle to internal testing
- Build the bundle:
flutter build appbundle --release \
--build-name=1.2.0 --build-number=7 \
--dart-define=API_BASE_URL=https://api.example.com- Find it at
build/app/outputs/bundle/release/app-release.aab. - In Play Console, open your app, then Testing > Internal testing.
- On the Testers tab, create an email list and add your testers.
- On the Releases tab, choose Create new release and upload the
.aab. - Write release notes, review the release, and choose Save, then Roll out to internal testing.
- Copy the opt-in link from the Testers tab and send it to testers.
Testers must open the opt-in link while signed in with the Google account on your list. After that, they install the app from the Play Store. Updates arrive through the normal Play Store update flow.
Common upload errors
| Message or symptom | Cause | Fix |
|---|---|---|
| Version code has already been used | The build number matches an earlier upload on any track | Increase the number after `+` in `pubspec.yaml`, or pass a higher `--build-number` |
| Upload key mismatch, signed with the wrong key | The bundle was signed with a key other than the registered upload key | Sign with the upload keystore, or request an upload key reset |
| You uploaded a debug-signed bundle | `signingConfig` for `release` is missing, so Gradle used the debug key | Check `key.properties` and the release `signingConfig` |
| Target API level too low | The app targets an older Android API than Play currently requires | Raise `targetSdk`, usually through the Flutter SDK version |
| Testers see "item not found" | The tester is on the wrong account, or is not on the list | Use the listed account and the opt-in link |
Version codes must be unique across the whole app, not per track. If internal testing has code 7, closed testing cannot accept a different build with code 7.
Closed and open testing
Closed testing works like internal testing, but you can create multiple tracks, use Google Groups, and reach many more testers. Releases are reviewed by Google before testers receive them, so allow time.
For personal developer accounts created after November 2023, Google requires a closed test with a minimum number of testers over a minimum period before you can apply for production access. Check the current numbers in Play Console, because Google has changed them before. Plan this period into your schedule, since it cannot be shortened.
To promote a release you already tested, open the track, choose Promote release, and pick the destination. Promotion reuses the same bundle with the same version code. This is preferable to rebuilding, because the code you tested is exactly the code you ship.
Countries and devices
Each track has a Countries / regions setting. A release reaches only users in the selected countries. Play also filters by device compatibility, which derives from your manifest, such as required hardware features and minimum SDK. Use the Device catalog page to see which devices your bundle excludes and why.
Releasing to production
- Confirm that the dashboard tasks for production are complete.
- Open Production and choose Create new release.
- Add the bundle, either by uploading it or by selecting it from the library of earlier uploads.
- Write release notes for each language, using the tags Play provides.
- Choose Next, resolve errors, and review warnings.
- Set the rollout percentage, then start the rollout.
After you submit, the release goes into review. Review time varies from hours to several days, and new apps or apps with sensitive permissions tend to take longer. The default setting in Play Console publishes automatically after approval. You can instead turn on managed publishing in Publishing overview, which holds approved changes until you press publish.
Staged rollouts
A staged rollout delivers the release to a percentage of users, which limits the damage from a bad build.
A common schedule is 5 percent, then 20 percent, then 50 percent, then 100 percent, with a day or two between steps. Between steps, check Android vitals and Crashlytics, or whichever crash reporter you use, for crash rate and ANR (application not responding) rate. If the numbers rise, choose Halt rollout. Halting stops new users from receiving the release, but it does not remove it from devices that already updated.
You cannot roll back to an older bundle, because version codes only increase. To fix a bad release, build a new bundle with a higher version code that contains the fix, or the old code, and release that.
Deobfuscation files
If you built with --obfuscate --split-debug-info=build/symbols, Dart stack traces are unreadable without the symbols. Keep the build/symbols folder for every release, named by version. Upload the files to your crash reporter. Play Console also accepts a native debug symbols zip for native crashes on the release page. Without these files, crash reports from production are much harder to act on.
Practical release checklist
- Run the release build on a real device before uploading.
- Increase the build number for every upload, even failed or rejected ones.
- Keep the bundle, the symbols, and the commit hash together for each version.
- Start every release at internal testing, even for a one-line fix.
- Use staged rollout for production, and watch crash rates between steps.
Exercise
Your internal testing release uses version code 12. You find a bug, fix it, and build another bundle without changing pubspec.yaml. What happens on upload, and what do you do?
Show answer
Play Console rejects the upload because version code 12 is already used. Version codes must be unique across all tracks of the app. Increase the build number (for example, version: 1.2.0+13, or pass --build-number=13), rebuild the bundle, and upload it.
Exercise
After a production rollout reaches 20 percent, crash reports show a new crash. What can you do in Play Console, and what can you not do?
Show answer
You can halt the rollout so no further users receive the release. You cannot remove the release from devices that already installed it, and you cannot roll back to an older bundle. To fix the problem, build a new bundle with a higher version code and release it, ideally through the testing tracks first.
Exercise
Why is promoting a tested release to production better than building a new bundle for production?
Show answer
Promotion reuses the exact bundle, with the same code and version code, that testers already ran. A new build could differ in dependencies, defines, or signing and has not been tested.