Challenge - 5 Problems
Build Variant Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Understanding build variant purpose
What is the main purpose of having separate debug and release build variants in Android development?
Attempts:
2 left
💡 Hint
Think about why developers need different versions during development and for users.
✗ Incorrect
Debug builds include debugging tools and are easier to test, while release builds are optimized and signed for distribution.
❓ ui_behavior
intermediate1:30remaining
Behavior difference in debug vs release
If you add a log statement inside your Android app, in which build variant will the log messages typically appear?
Attempts:
2 left
💡 Hint
Consider what happens to logs in release builds for performance and security.
✗ Incorrect
Debug builds show logs to help developers, but release builds usually remove or disable logs to improve performance and security.
❓ lifecycle
advanced2:00remaining
Build variant effect on app signing
Which statement correctly describes how app signing differs between debug and release build variants in Android?
Attempts:
2 left
💡 Hint
Think about how apps are prepared for publishing versus testing.
✗ Incorrect
Debug builds use a default debug keystore for convenience, while release builds must be signed with a secure keystore provided by the developer.
📝 Syntax
advanced2:00remaining
Gradle build variant configuration
Given this snippet in build.gradle.kts, which option correctly adds a custom field only to the debug build?
Android Kotlin
android {
buildTypes {
getByName("debug") {
// Add custom field here
}
}
}Attempts:
2 left
💡 Hint
Remember the syntax requires types and values as strings with escaped quotes.
✗ Incorrect
The correct syntax uses escaped double quotes (\") inside the double-quoted value string.
🔧 Debug
expert2:30remaining
Release build crashes due to missing debug-only code
You have code that calls a debug-only method inside your app. It works in debug builds but crashes in release builds. What is the most likely cause?
Attempts:
2 left
💡 Hint
Think about code shrinking and conditional compilation in release builds.
✗ Incorrect
Release builds often remove debug-only code via ProGuard or build config flags, so calling such methods causes crashes.