0
0
Fluttermobile~20 mins

Android build configuration in Flutter - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Android Build Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
ui_behavior
intermediate
2:00remaining
Understanding Android build flavors in Flutter
You have two build flavors: dev and prod. Which command builds the dev flavor APK?
Aflutter build apk --flavor prod
Bflutter build apk --flavor dev
Cflutter run --flavor prod
Dflutter run --flavor dev
Attempts:
2 left
💡 Hint
Use the build command with the flavor name to create the APK.
🧠 Conceptual
intermediate
2: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?
AIt defines Android build settings like SDK versions, dependencies, and signing configs.
BIt contains Flutter Dart code for UI components.
CIt manages iOS build configurations.
DIt stores Flutter package dependencies.
Attempts:
2 left
💡 Hint
Think about what controls Android-specific build details.
📝 Syntax
advanced
2:30remaining
Correct syntax for signing config in build.gradle
Which option correctly defines a signing config named release in the Android build.gradle file?
A
signingConfigs {
    release {
        storeFile = file('keystore.jks')
        storePassword = 'password'
        keyAlias = 'key'
        keyPassword = 'password'
    }
}
B
signingConfigs {
    release: {
        storeFile = 'keystore.jks'
        storePassword = 'password'
        keyAlias = 'key'
        keyPassword = 'password'
    }
}
C
signingConfigs {
    release {
        storeFile 'keystore.jks'
        storePassword 'password'
        keyAlias 'key'
        keyPassword 'password'
    }
}
D
signingConfigs {
    release {
        storeFile file('keystore.jks')
        storePassword 'password'
        keyAlias 'key'
        keyPassword 'password'
    }
}
Attempts:
2 left
💡 Hint
In Gradle Groovy DSL (used in Flutter), properties in signingConfigs blocks use no '=' and file() for paths.
lifecycle
advanced
2:00remaining
Effect of changing minSdkVersion in build.gradle
If you increase minSdkVersion in your Android build.gradle file, what is the likely effect?
AThe app will not run on devices with Android versions below the new minSdkVersion.
BThe app will support more devices.
CThe app size will automatically decrease.
DThe app will run faster on all devices.
Attempts:
2 left
💡 Hint
minSdkVersion sets the lowest Android version supported.
🔧 Debug
expert
3: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?
AThe AndroidManifest.xml file is missing required permissions.
BThe Flutter SDK is outdated and needs updating.
CThe keystore file path in build.gradle is incorrect or the file is missing.
DThe Dart code has syntax errors.
Attempts:
2 left
💡 Hint
Check the file path and existence of the keystore file.