AAB vs APK
An AAB is the publishing bundle you upload; an APK is the package Android installs. For a new Google Play phone app, prepare a signed release AAB rather than uploading the debug APK you used during development.
| Format | What it contains | How you use it |
|---|---|---|
| APK | An installable Android package | Install a debug APK for local checks; test Play-delivered APKs through a track. |
| AAB | Compiled code and resources in a publishing bundle | Upload a signed release bundle; Google Play generates device-appropriate APKs. |
As of November 2026, new Google Play apps must use Android App Bundles, a requirement introduced in August 2021, and use Play App Signing. You sign the upload bundle with your upload key; Google generates installable APKs and signs them with the app signing key. A debug APK that worked on your phone is useful evidence during development, but it is neither the signed release AAB nor proof that the Play-delivered build works correctly.
Apirex generates a normal Kotlin, Jetpack Compose and Gradle project and debug APKs for testing on your Android phone. You build the signed release AAB with your own upload key and publish through your own Play Console account. Apirex does not sign into Play Console or submit apps. You can ask the builder to set up release signing configuration that reads a local properties file; keep the keystore and passwords outside chat, screenshots and committed source.
Think of the release as a chain of artifacts: source and Gradle settings produce a signed bundle, then Play produces APKs suited to device configurations. The bundle itself is not something a tester normally taps to install. Use a Play testing track to verify the installation users will receive, especially when the app depends on certificate-bound authentication, resource selection or release-only configuration.
As of November 2026, Google’s requirement for new standard Android phone apps and updates is Android 16, API level 36, or higher, effective August 31, 2026. This is targetSdk, not minSdk: raising the target does not by itself mean abandoning every older phone. Review Android behavior changes and dependencies before rebuilding. Other device categories and distribution exceptions have separate rules; check the current requirement shown in your Play Console when your app is outside this phone-app scope.
Before signing, inspect the application ID, release endpoints, permissions and version fields in the app module. A release should not depend on a local development server that reviewers cannot reach. Remove accidental test data and make sure logging does not expose private user information. Building successfully proves that tools accepted the project; it does not prove that login, purchases or saved data work correctly.
Play App Signing
Play App Signing manages the signing identity used for APKs distributed by Google Play. Your upload key authorizes the bundle upload, while the app signing key signs what users install.
| Key | Who uses it | Recovery implication |
|---|---|---|
| Upload key | You sign the AAB; Play checks the uploader certificate | A registered upload key can be reset through Play Console. |
| App signing key | Play signs the APKs delivered to users | This establishes update identity; upload-key reset does not replace it. |
For a new app, follow the Play Console app signing setup and read the key-management options before accepting them. Keep a record of both certificates and which external services use each fingerprint. If you also distribute elsewhere, decide your signing strategy before release rather than assuming every store will share the same identity. Different signing identities can affect updates and certificate-dependent integrations.
A common failure is configuring an API service with the upload fingerprint while testing a Play-installed build. That build normally carries the app signing certificate, so the API service may reject it even though a locally installed APK works. Compare the installed distribution channel with the certificate registered at the provider. Do not fix the mismatch by weakening backend authorization or embedding a private credential in the app.
Use the Play Console app signing page to read the app signing certificate’s SHA-1 and SHA-256 values. For a local certificate, use the keytool listing or Gradle signing report shown below. Fingerprints are certificate identifiers; exporting a certificate does not export the private key. Label your records clearly so future updates do not accidentally replace a production integration with a debug identity.
Upload key
Create one protected upload key and configure your release build to use it consistently. Keep the passwords in a local properties file excluded from version control, and back up the keystore separately from the source repository.
Create an upload keystore from a terminal on your own computer. The command below prompts for passwords and certificate identity information; use a password manager and a protected storage location rather than putting passwords in the shell command. Record the alias exactly, because Gradle must select the same entry. Run this once for a new upload identity, not before every release.
keytool -genkeypair -v -keystore upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias uploadCreate keystore.properties at the project root and store the keystore there for this example. The following is the properties-file schema, not a ready-to-use credential file: replace the uppercase values locally before building. Add both paths to the root .gitignore before creating secrets, and verify that neither file is already tracked. Ignoring a previously committed file does not remove it from repository history.
storeFile=upload-keystore.jks
storePassword=LOCAL_STORE_PASSWORD
keyAlias=upload
keyPassword=LOCAL_KEY_PASSWORD/keystore.properties
/upload-keystore.jksMerge this fragment into app/build.gradle.kts, retaining the project’s existing plugins and other Android settings. The imports belong at the top of the file; load properties after the plugins block, then merge the android block rather than nesting a second one inside it. The required file load intentionally fails if local signing credentials are absent, instead of silently producing a misleading release artifact.
import java.util.Properties
// After the existing plugins block:
val keystoreProperties = Properties().apply {
rootProject.file("keystore.properties").inputStream().use { load(it) }
}
android {
compileSdk = 36
defaultConfig {
targetSdk = 36
versionCode = 1
versionName = "1.0"
}
signingConfigs {
create("release") {
storeFile = rootProject.file(keystoreProperties.getProperty("storeFile"))
storePassword = keystoreProperties.getProperty("storePassword")
keyAlias = keystoreProperties.getProperty("keyAlias")
keyPassword = keystoreProperties.getProperty("keyPassword")
}
}
buildTypes {
getByName("release") {
signingConfig = signingConfigs.getByName("release")
}
}
}Build from the project root with the Gradle wrapper. For the ordinary app module without product flavors, the output is app/build/outputs/bundle/release/app-release.aab. Increase versionCode for each uploaded update, and choose a versionName that communicates the release to users. The example’s versionCode of 1 is only suitable when it has not already been used for this app; do not overwrite a previously uploaded version identity.
./gradlew bundleRelease
keytool -list -v -keystore upload-keystore.jks -alias upload
./gradlew signingReportThe keytool listing shows SHA-1 and SHA-256 certificate fingerprints for that keystore entry. The Gradle report shows certificates for configured variants; check which variant you are reading rather than copying the debug fingerprint. For a Play-distributed app, API providers commonly need the app signing certificate fingerprints from Play Console, not just your local upload certificate. Fingerprints identify certificates and are not the private signing key.
If a release signing configuration already exists, edit it instead of creating a second configuration with the same name. Projects with product flavors can have different task names and output directories; inspect the actual variant rather than copying the ordinary app-module path blindly. After changing the target SDK or signing setup, run a release build and test through a Play track before assuming the configuration is complete.
Android Studio offers an alternative interactive route through Build, Generate Signed Bundle / APK, Android App Bundle. Select the app module, your keystore and alias, then the release variant. It still uses your credentials and does not replace account verification or Play review. Do not capture screenshots of the dialog with visible passwords or a private filesystem path containing identifying information.
Keeping keys safe
Protect the upload keystore, its passwords and account access as separate assets. A source backup without the keystore is not a signing backup, and a keystore copy without the correct password may be unusable.
Use encrypted backups with access limited to the people responsible for releases. Keep a recovery record containing the alias, certificate fingerprints and storage locations, but avoid placing passwords in the same unsecured note as the keystore. Test that you can read a restored backup using keytool without changing the original. When a release computer is replaced, restore the existing upload identity instead of generating a new unregistered one.
If the upload key is lost or compromised, create a replacement upload key and export its public certificate as PEM with keytool -export -rfc -keystore upload-keystore.jks -alias upload -file upload_certificate.pem. Follow the upload-key reset request in Play Console’s app signing area; have the account owner initiate the request where required. Submit the certificate, never the private keystore or its password, and wait for Google’s confirmation before using the replacement. Resetting an upload key does not change the app signing key or invalidate users’ installed app identity.
Upload-key reset and app signing-key upgrade are different operations. A reset replaces the credential accepted for future uploads; it is not a general way to change the signing identity of already installed apps. If the app signing identity itself needs attention, use Google’s documented app-signing options and consider compatibility consequences. Avoid improvising by changing application IDs or creating a second store record just to bypass a certificate error.
Successful signing does not unlock production access. As of November 2026, each app under a personal account opened after November 13, 2023 needs a closed test with 12 or more people continuously opted in for 14 days or longer before a production-access application. An email invitation is not opt-in, and qualification does not publish the app automatically. Earlier personal accounts and organizations avoid this particular gate, not testing or policy duties. See Play Store closed testing for planning and evidence.
| Track | Audience | Purpose |
|---|---|---|
| Internal | A small selected group | Quick release-build checks; does not replace the required closed test. |
| Closed | An explicitly selected audience | Structured testing and the qualifying test for affected personal accounts. |
| Open | A broader audience who can join | Public testing when account access and setup permit it. |
| Production | Users in your selected distribution settings | Public release after required access, declarations and review. |
As of November 2026, a correctly signed file still needs accurate App content information: Data safety covering both the app and its SDKs, a content rating, ads and audience declarations, and the required privacy policy. Local storage does not cancel data sent by sign-in, analytics or other libraries. Recheck these answers after implementation changes. Publish an app on Google Play covers the listing and declaration work beyond signing.
A signed release must also be accessible to review. Put a separate, reusable app login and clear English directions in App access, covering paid features, restricted roles and unusual routes. Access must work across reviewer locations without expiry or an unavailable one-time code. Check it on a clean installation and maintain it during review; it must never be your Google-account password. The Google Play publishing guide covers reviewer preparation.
Frequently asked questions
Can I install an AAB directly on my phone?
Not as a normal installable package. Google Play processes the publishing bundle into APKs, and a testing track lets you test those delivered packages.
Where is the signed release bundle?
For an ordinary app module without product flavors, ./gradlew bundleRelease writes app/build/outputs/bundle/release/app-release.aab. Check your configured variant if the output differs.
What should stay out of Git?
Exclude the private keystore and keystore.properties containing passwords. If either was already committed, remove it from tracking and assess the exposure rather than relying only on .gitignore.
Can a lost upload key be reset?
For apps using Play App Signing, follow the upload-key reset process with a replacement public certificate. Wait for confirmation; this does not change the app signing key.
Why does login work locally but fail from Play?
Check the API provider’s package name and certificate registration. The Play-installed app commonly needs the app signing certificate fingerprint instead of the debug or upload fingerprint.
All guides
Native foundations
Build with AI
- How to build an Android app with AI
- How to build an iOS app with AI
- How to build an iPad app with AI
- How to build a Mac app with AI
- How to build an app without coding
- Prompts that produce good apps
- Local AI app builder: build apps on your own computer
- How to add payments to your app
- Gradle build failed: common fixes
Google Play
Apple distribution
Build it on your own computer
Describe the app and Apirex writes real source you own, then builds it on your machine.
Opens Apirex with this prompt. Pick the Android · Kotlin tab before you send. The Free plan includes 5 Rex Credits a day.