โ† All AAD Flashcard Decks

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
  1. When would you use `abiFilters` in an Android Gradle build configuration?

    Answer: To specify which CPU architectures (e.g., arm64-v8a, x86) are included in the APK

    `abiFilters` restricts which CPU architecture native libraries are included in the APK, reducing its size by excluding architectures not needed for target devices.

  2. Where should API keys and sensitive credentials be stored in an Android project to keep them out of source control?

    Answer: In `local.properties` or environment variables, excluded from version control via `.gitignore`

    Storing API keys in `local.properties` (excluded via `.gitignore`) or reading them from environment variables in CI prevents accidental exposure of credentials in version control.

  3. Which Gradle command runs unit tests for an Android project from the command line?

    Answer: ./gradlew test

    `./gradlew test` runs all unit tests for all build variants; you can also run `./gradlew testDebugUnitTest` to target only the debug variant.

  4. What is a 'product flavor' in Android Gradle?

    Answer: A custom build configuration representing a different version of the app, such as free vs. paid

    Product flavors let you define distinct app versions (e.g., free/paid, demo/full) within a single project, each with its own source sets, resources, and configurations.

  5. What is the Gradle Wrapper (`gradlew`) and why is it important for Android projects?

    Answer: A script that downloads and uses the exact Gradle version specified for the project

    The Gradle Wrapper automatically downloads the Gradle version specified in `gradle-wrapper.properties`, ensuring consistent builds across developer machines and CI environments.

  6. What is the purpose of `manifestPlaceholders` in Gradle build configuration?

    Answer: To inject build-variant-specific values into `AndroidManifest.xml` at build time

    `manifestPlaceholders` allows values defined in Gradle (per build type or flavor) to be substituted into `AndroidManifest.xml` using the `${placeholder}` syntax during the build process.

  7. What is Gradle's default strategy when two modules depend on different versions of the same library?

    Answer: It selects the newest requested version of the conflicting dependency automatically

    Gradle's default conflict resolution strategy selects the newest requested version of the conflicting dependency, which can be overridden using `resolutionStrategy` in the build file.