Major AAB Update: We’ve completely rebuilt our AAB (Android App Bundle) system to fix all the issues that were preventing successful Google Play Store uploads. This update addresses version codes, signing keys, format detection, and build validation.
What Was Broken (And Now Fixed)
When we first launched AAB support, users ran into multiple critical issues:
| Issue | Error Message | Status |
|---|---|---|
| Version code conflicts | “Version code 1 has already been used” | ✅ Fixed |
| Signing key mismatch | “Signing certificate doesn’t match” | ✅ Fixed |
| AAB showing as APK | History showed wrong format | ✅ Fixed |
| Upload builds ignored format | Always created APK instead of AAB | ✅ Fixed |
| Invalid AABs | “BundleConfig.pb not found” at upload | ✅ Fixed |
The Complete Solution
1. Persistent Keystore Per App
Problem: Every build generated a new signing keystore, so Google Play rejected uploads due to inconsistent signing certificates.
Solution: Keystores are now persisted per user per app. When you build with the same packageName, you get the same signing key every time.
How it works:
- First build: Generates new keystore + saves it
- Second build: Reuses the same keystore
- All future builds: Same signing certificate
- Google Play: Accepts all uploads (consistent signing)
2. Auto-Incrementing Version Codes
Problem: All builds used versionCode=1, causing Google Play to reject any update.
Solution: Automatic version tracking that increments with each build.
| Build | versionCode | versionName |
|---|---|---|
| 1st | 1 | 1.0.0 |
| 2nd | 2 | 1.0.1 |
| 3rd | 3 | 1.0.2 |
| 4th | 4 | 1.0.3 |
3. Fixed Format Detection
Problem: AAB builds were incorrectly showing as APK in history, and upload builds always created APK regardless of user selection.
Solution: Fixed the format detection logic so AABs are correctly identified and upload builds respect your output format choice.
4. AAB Validation
Problem: Invalid AABs (missing required files) weren’t caught until you tried uploading to Google Play.
Solution: Immediate validation after build. If the AAB is invalid, you’ll know right away with a clear error message.
⚠️ Critical: Use the Same Package Name
To benefit from persistent keystores and version tracking, always use the same packageName for all builds of your app.
Correct workflow:
Build 1: packageName=com.mycompany.myapp
→ Creates keystore + versionCode=1
Build 2: packageName=com.mycompany.myapp (SAME)
→ Reuses keystore + versionCode=2
→ Google Play accepts (same signing, higher version)
Build 3: packageName=com.mycompany.myapp (SAME)
→ Reuses keystore + versionCode=3
→ Google Play accepts
Wrong workflow:
Build 1: packageName=com.mycompany.myapp
→ Creates keystore + versionCode=1
Build 2: packageName=com.different.app (CHANGED)
→ Creates NEW keystore + versionCode=1
→ Google Play rejects (different signing key)
Uploading to Google Play Store
Once your AAB is built:
- Download the .aab file
- Go to Google Play Console
- Select your app → Releases → Production → Create new release
- Upload the AAB file
- Google Play validates:
- ✅ versionCode is higher than current
- ✅ Package name matches
- ✅ Signing certificate is consistent
- Add release notes and submit for review
Troubleshooting
“Version code 1 has already been used”
Cause: You’re using the same packageName but versionCode reset to 1.
Fix: Use auto-increment (don’t specify versionCode) — the platform will automatically use the next available version.
“Signing certificate doesn’t match”
Cause: Different packageName = different keystore.
Fix: Go back to your original packageName. The keystore is tied to the package name.
“BundleConfig.pb not found”
Cause: The AAB build was invalid (likely Gradle/AGP version issue).
Fix: Check your build logs. The validation catches this immediately so you don’t waste time uploading to Play Store.
What’s Fixed Summary
| Issue | Before | After |
|---|---|---|
| Version conflicts | All builds = versionCode 1 | Auto-increment (1, 2, 3…) |
| Signing issues | New keystore every build | Persistent keystore per app |
| Format detection | AAB showed as APK | Correct format displayed |
| Upload format | Always created APK | Respects user selection |
| Invalid builds | Caught at Play Store | Validated immediately |
Ready to Build?
The AAB system is now fully functional and ready for Google Play Store submissions. Just remember:
- Use the same
packageNamefor all builds of your app - Let auto-increment handle versions (or provide custom if needed)
- Download and upload your AAB to Google Play
👉 Build your AAB now at aistudioapk.com
Questions? Join our community at r/aistudioapk