Challenge - 5 Problems
Project Structure Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Identify the role of the app module in an Android project
In an Android project, what is the primary purpose of the app module folder?
Attempts:
2 left
💡 Hint
Think about where you write your Kotlin code and place your images or layouts.
✗ Incorrect
The app module is the main module where you write your app's Kotlin code, add resources like layouts and images, and configure the AndroidManifest.xml specific to your app.
❓ ui_behavior
intermediate2:00remaining
What happens if you change the applicationId in build.gradle?
If you change the
applicationId in the app/build.gradle file, what is the effect when you run the app?Attempts:
2 left
💡 Hint
Think about how Android identifies apps uniquely on a device.
✗ Incorrect
The applicationId uniquely identifies your app on the device. Changing it causes Android to treat it as a different app, so it installs separately.
❓ lifecycle
advanced2:30remaining
Order of manifest merging in Android projects
When building an Android app, the final AndroidManifest.xml is created by merging multiple manifests. Which is the correct order of priority from highest to lowest during this merge?
Attempts:
2 left
💡 Hint
Build variants and flavors can override app module settings.
✗ Incorrect
The manifest merging prioritizes build variants/flavors first, then the app module manifest, followed by library manifests, and finally the Android SDK manifest.
📝 Syntax
advanced2:00remaining
Identify the correct Gradle dependency syntax
Which of the following is the correct way to add the Kotlin standard library dependency in the
app/build.gradle file?Attempts:
2 left
💡 Hint
Modern Gradle uses 'implementation' with single quotes for dependencies.
✗ Incorrect
The correct syntax uses 'implementation' with single quotes. 'compile' is deprecated and double quotes are allowed but single quotes are preferred.
🔧 Debug
expert3:00remaining
Why does the app crash on startup after manifest change?
You changed the
android:name attribute in the application tag of your AndroidManifest.xml to a custom Application class but the app crashes immediately on launch. What is the most likely cause?Attempts:
2 left
💡 Hint
The system expects a specific base class for the Application attribute.
✗ Incorrect
The custom Application class must extend android.app.Application. If it does not, the app will crash because the system cannot instantiate it properly.