0
0
Android Kotlinmobile~10 mins

Project structure (app, gradle, manifests) in Android Kotlin - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the Android app module directory name in the project.

Android Kotlin
rootProject.name = "MyApplication"
include(":[1]")
Drag options to blanks, or click blank then click option'
Aapp
Bbuild
Cgradle
Dmanifest
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'build' or 'gradle' which are build system folders, not modules.
Confusing 'manifest' with module name.
2fill in blank
medium

Complete the Gradle build script line to apply the Android application plugin.

Android Kotlin
plugins {
    id("[1]")
}
Drag options to blanks, or click blank then click option'
Aapplication
Bjava-library
Ccom.android.application
Dkotlin
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'application' which is for plain Java/Kotlin apps, not Android.
Using 'java-library' which is for Java libraries.
3fill in blank
hard

Fix the error in the AndroidManifest.xml root tag to declare the correct XML namespace.

Android Kotlin
<manifest xmlns:android="[1]"
    package="com.example.app">
</manifest>
Drag options to blanks, or click blank then click option'
Ahttp://www.w3.org/2000/xmlns/
Bhttp://schemas.android.com/apk/res/android
Chttp://schemas.android.com/tools
Dhttp://schemas.android.com/apk/res-auto
Attempts:
3 left
💡 Hint
Common Mistakes
Using the tools namespace URL instead of the Android namespace.
Using XML namespace URLs unrelated to Android.
4fill in blank
hard

Fill both blanks to declare the minimum SDK version and target SDK version in build.gradle.kts.

Android Kotlin
android {
    defaultConfig {
        minSdk = [1]
        targetSdk = [2]
    }
}
Drag options to blanks, or click blank then click option'
A21
B30
CcompileSdkVersion
DandroidVersion
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing compileSdkVersion with minSdkVersion or targetSdkVersion.
Using invalid values or variable names.
5fill in blank
hard

Fill all three blanks to define the application ID, version code, and version name in build.gradle.kts.

Android Kotlin
android {
    defaultConfig {
        applicationId = "[1]"
        versionCode = [2]
        versionName = "[3]"
    }
}
Drag options to blanks, or click blank then click option'
Acom.example.myapp
B1
C1.0
Dcom.example.app
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid application IDs or missing quotes.
Using non-integer version codes.
Confusing versionCode and versionName formats.