0
0
Android Kotlinmobile~20 mins

Project structure (app, gradle, manifests) in Android Kotlin - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Project Structure Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2: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?
AIt contains the source code, resources, and configuration files for the Android application.
BIt manages the build scripts and dependencies for the entire project including all modules.
CIt holds only the manifest files for all modules in the project.
DIt stores the global Gradle wrapper files used by all modules.
Attempts:
2 left
💡 Hint
Think about where you write your Kotlin code and place your images or layouts.
ui_behavior
intermediate
2: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?
AThe app's UI layout will change automatically to match the new ID.
BThe app updates the existing app on the device regardless of the ID.
CThe app will fail to build due to a missing manifest file.
DThe app installs as a new, separate app on the device with the new ID.
Attempts:
2 left
💡 Hint
Think about how Android identifies apps uniquely on a device.
lifecycle
advanced
2: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?
A4, 2, 1, 3
B1, 4, 2, 3
C4, 1, 2, 3
D3, 2, 1, 4
Attempts:
2 left
💡 Hint
Build variants and flavors can override app module settings.
📝 Syntax
advanced
2: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?
Aimplementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.0"
Bimplementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.0'
Ccompile 'org.jetbrains.kotlin:kotlin-stdlib:1.8.0'
Dcompile "org.jetbrains.kotlin:kotlin-stdlib:1.8.0"
Attempts:
2 left
💡 Hint
Modern Gradle uses 'implementation' with single quotes for dependencies.
🔧 Debug
expert
3: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?
AThe custom Application class does not extend <code>android.app.Application</code>.
BThe custom Application class is not declared in the <code>build.gradle</code> file.
CThe custom Application class is missing a default constructor.
DThe <code>android:name</code> attribute must be set in the <code>activity</code> tag, not <code>application</code>.
Attempts:
2 left
💡 Hint
The system expects a specific base class for the Application attribute.