Preparing a Release Build
App bundles and shrinking.
From Debug to Release
Every day you run the debug build from Android Studio. But Google Play needs a release build: smaller, faster, and not tagged as debuggable.
A release build is different in three key ways: it is signed with your release key, it has debuggable false, and it is usually shrunk to remove unused code and resources.
In this lesson you will prepare a proper release build and produce the file Google Play wants: an Android App Bundle (.aab).
Build Types in Gradle
Gradle defines two build types by default: debug and release. You configure them in your module's build.gradle.kts.
The release block is where you turn on optimizations. Notice isMinifyEnabled and isShrinkResources below — these are the switches that make your app smaller.
android {
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
}All lessons in this course
- Preparing a Release Build
- App Signing
- The Play Console & Listing
- Rollouts and Updates