Challenge - 5 Problems
Android Build Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ ui_behavior
intermediate2:00remaining
Understanding Android build flavors in Flutter
You have two build flavors: dev and prod. Which command builds the dev flavor APK?
Attempts:
2 left
💡 Hint
Use the build command with the flavor name to create the APK.
✗ Incorrect
The command 'flutter build apk --flavor dev' builds the APK for the dev flavor. 'flutter run' runs the app on a device but does not create a build artifact.
🧠 Conceptual
intermediate2:00remaining
Purpose of build.gradle in Android Flutter projects
What is the main role of the
build.gradle file inside the Android folder of a Flutter project?Attempts:
2 left
💡 Hint
Think about what controls Android-specific build details.
✗ Incorrect
The build.gradle file configures Android build parameters such as SDK versions, dependencies, and signing. Flutter Dart code and package dependencies are managed elsewhere.
📝 Syntax
advanced2:30remaining
Correct syntax for signing config in build.gradle
Which option correctly defines a signing config named
release in the Android build.gradle file?Attempts:
2 left
💡 Hint
In Gradle Groovy DSL (used in Flutter), properties in signingConfigs blocks use no '=' and file() for paths.
✗ Incorrect
Option D uses correct Gradle Groovy syntax (standard in Flutter android/app/build.gradle): storeFile file('keystore.jks') with no '='. Option D uses invalid ':', C uses '=' (for Kotlin DSL), D misses file().
❓ lifecycle
advanced2:00remaining
Effect of changing minSdkVersion in build.gradle
If you increase
minSdkVersion in your Android build.gradle file, what is the likely effect?Attempts:
2 left
💡 Hint
minSdkVersion sets the lowest Android version supported.
✗ Incorrect
Increasing minSdkVersion means devices with older Android versions cannot install or run the app. It does not affect speed or app size directly.
🔧 Debug
expert3:00remaining
Diagnosing build failure due to missing keystore file
You get this error when building a release APK: FileNotFoundException: keystore.jks (No such file or directory). What is the most likely cause?
Attempts:
2 left
💡 Hint
Check the file path and existence of the keystore file.
✗ Incorrect
The error clearly states the keystore file is not found. This usually means the path in build.gradle is wrong or the file is not present. Other options do not cause this error.