Android Build System, Gradle & App Deployment Flashcards
7 cards from real AAD practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Android Build System, Gradle & App Deployment flashcards as text
What is an Android App Bundle (AAB) and how does it differ from an APK?
Answer: An AAB is processed by the Play Store to generate optimized APKs per device; APK is installed directly on devices
An Android App Bundle (AAB) is uploaded to the Play Store, which generates split APKs tailored to each device's configuration (architecture, screen density, language), reducing download size.
What is the purpose of ProGuard/R8 in a release build?
Answer: To shrink, optimize, and obfuscate the app's bytecode
ProGuard/R8 performs code shrinking (removes unused code), optimization (improves bytecode efficiency), and obfuscation (renames classes/methods) during the release build process.
Which Gradle dependency scope makes a library available at compile time but excludes it from the final APK?
Answer: compileOnly
`compileOnly` makes the dependency available to the compiler but excludes it from the output APK/AAR, useful for annotation processors and other compile-time-only tools.
What must be changed before publishing an app update to the Google Play Store?
Answer: The `versionCode` must be incremented from the previously published release
The `versionCode` must be incremented with each new Play Store submission; the Play Store rejects updates with a `versionCode` equal to or lower than the currently published version.
What is the purpose of `local.properties` in an Android project?
Answer: To store machine-specific configuration like the Android SDK path, excluded from version control
`local.properties` stores environment-specific configuration (like the `sdk.dir` path) that varies per developer machine and should not be committed to version control.
How does the `api` dependency configuration differ from `implementation` in Gradle?
Answer: `api` exposes the dependency to consumers of your library module; `implementation` keeps it internal
`api` makes the dependency part of your module's public API (visible to dependent modules), while `implementation` hides it, preventing leakage and improving build performance.
What does `buildConfigField` in Gradle allow developers to do?
Answer: Inject a constant into the generated `BuildConfig` class accessible in app code at runtime
`buildConfigField` injects a typed constant (String, Boolean, int, etc.) into the generated `BuildConfig` class, allowing build-variant-specific values to be accessed directly in Kotlin/Java code.