Sub topic 12
Publishing to Google Play Testing Tracks and Production
Assume you have basic Flutter and Android knowledge, a Google Play Console account, and a signed Android App Bundle (AAB). Your app must also have a unique application ID and a higher versionCode for every uploaded release.
Prepare the release
Google Play uses the AAB to generate optimized APKs for each device. Build it in release mode with the same signing configuration you will use for future updates:
flutter clean
flutter pub get
flutter build appbundle --release \
--dart-define=API_BASE_URL=https://api.example.comThe output is usually:
build/app/outputs/bundle/release/app-release.aabBefore uploading, check these items:
- The version in
pubspec.yamlhas a new build number, such asversion: 1.3.0+8. - The release API endpoint is correct.
- Release signing uses the production upload key.
- Debug menus, test accounts, and development logging are disabled or protected.
- The app works without a development server.
- Privacy, content rating, target API, and store listing information are complete.
The number after + becomes Android's versionCode. It must increase with every Play upload. The number before + is the user-facing version name.
Choose a testing track
Play Console provides tracks with increasing exposure:
| Track | Main use | Typical audience |
|---|---|---|
| Internal testing | Fast checks of a build | Up to a small team of trusted testers |
| Closed testing | Controlled external testing | Invited testers or managed groups |
| Open testing | Wider public beta | Any eligible Play user |
| Production | General release | All users in selected countries |
Internal testing is useful for verifying installation, login, payments, and basic startup. Closed testing is better for testing different devices and real-world workflows. Open testing provides broader feedback but makes the app visible as a beta.
A tester must usually join the selected track and install the test version through its Play Store link. Uploading a build does not automatically make it available to everyone.
flowchart TD
A[Build signed AAB] --> B[Upload to internal testing]
B --> C{Critical problems?}
C -->|Yes| D[Fix and increase versionCode]
D --> B
C -->|No| E[Promote to closed or open testing]
E --> F[Review feedback and Play reports]
F --> G[Create production release]
G --> H[Stage rollout]
H --> I[Monitor crashes and adoption]Create and promote a release
In Play Console, select the app, open Testing, choose a track, and create a release. Upload the AAB, review the generated version, add release notes, and save the release. Some apps require review before testers can receive the build.
After testing, you can promote the tested release to another track. Promotion reduces the chance of uploading a different binary by mistake. Confirm the countries, testers, content declarations, and release notes before starting the rollout.
For production, choose between a full rollout and a staged rollout. A staged rollout sends the release to a percentage of users first. Watch crash-free users, ANRs, reviews, login failures, and business metrics. Increase the percentage only when the data remains healthy. Pause the rollout if the app causes serious failures.
Automate the repeatable steps
A CI pipeline can check the repository, build the AAB, store signing credentials securely, and publish only after approval. Keep the keystore, Play service-account credentials, and API values outside the repository. Require a human approval step before production.
Exercise
A tested build has version 1.3.0+8, but production already contains version code 8. What must you change before uploading?
Show answer
Create a new build with a higher version code, such as 1.3.0+9, and upload that newly signed AAB.