R
Rishtaara
React Native Advanced: CI/CD Pipeline Mastery
Lesson 14 of 19Article18 min

Uploading Your First Android Bundle (AAB)

Google Play requires Android App Bundle (AAB) for new apps since 2021. Google generates optimized APKs per device configuration (screen density, ABI, language). You upload one AAB; Play serves the right APK to each user.

Why AAB, not APK

Google Play requires Android App Bundle (AAB) for new apps since 2021. Google generates optimized APKs per device configuration (screen density, ABI, language). You upload one AAB; Play serves the right APK to each user.

Release builds must be signed with your upload keystore. Play App Signing re-signs with Google's key for distribution.

AAB build and upload flow

Signing and build configuration

Generate upload keystore (one-time — backup securely)
keytool -genkeypair -v -storetype PKCS12 \
  -keystore android/app/upload-keystore.jks \
  -alias upload -keyalg RSA -keysize 2048 -validity 10000
android/app/build.gradle signingConfigs
signingConfigs {
  release {
    storeFile file(MYAPP_UPLOAD_STORE_FILE)
    storePassword MYAPP_UPLOAD_STORE_PASSWORD
    keyAlias MYAPP_UPLOAD_KEY_ALIAS
    keyPassword MYAPP_UPLOAD_KEY_PASSWORD
  }
}
buildTypes {
  release {
    signingConfig signingConfigs.release
    minifyEnabled true
    proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
  }
}
Build release AAB
cd android && ./gradlew bundleRelease
# Output: android/app/build/outputs/bundle/release/app-release.aab
# Verify: bundletool validate --bundle=app-release.aab

Manual first upload steps

  • Play Console → Your app → Testing → Internal testing → Create new release.
  • Upload app-release.aab; add release notes.
  • Create email list of testers; share opt-in link.
  • Review and roll out to internal track.
  • Install on physical device via opt-in link; verify before automating.