0
0
Android Kotlinmobile~10 mins

Android SDK and API levels 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 set the minimum SDK version in the build.gradle file.

Android Kotlin
android {
    defaultConfig {
        minSdkVersion [1]
    }
}
Drag options to blanks, or click blank then click option'
AversionCode
BcompileSdkVersion
CtargetSdkVersion
D21
Attempts:
3 left
💡 Hint
Common Mistakes
Using compileSdkVersion instead of minSdkVersion.
Using a string instead of a number.
2fill in blank
medium

Complete the code to set the target SDK version in the build.gradle file.

Android Kotlin
android {
    defaultConfig {
        targetSdkVersion [1]
    }
}
Drag options to blanks, or click blank then click option'
A30
BminSdkVersion
CversionCode
DcompileSdkVersion
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing targetSdkVersion with minSdkVersion.
Using a variable name instead of a number.
3fill in blank
hard

Fix the error in the code to correctly set the compile SDK version.

Android Kotlin
android {
    compileSdkVersion [1]
}
Drag options to blanks, or click blank then click option'
A"30"
BcompileSdkVersion
C30
DtargetSdkVersion
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the number in quotes causing a syntax error.
Using the wrong property name.
4fill in blank
hard

Fill both blanks to declare the SDK versions in the build.gradle file.

Android Kotlin
android {
    compileSdkVersion [1]
    defaultConfig {
        minSdkVersion [2]
    }
}
Drag options to blanks, or click blank then click option'
A33
B21
C30
DversionCode
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the values of compileSdkVersion and minSdkVersion.
Using versionCode instead of SDK versions.
5fill in blank
hard

Fill all three blanks to set SDK versions and version code in build.gradle.

Android Kotlin
android {
    compileSdkVersion [1]
    defaultConfig {
        minSdkVersion [2]
        versionCode [3]
    }
}
Drag options to blanks, or click blank then click option'
A33
B21
C1
DversionName
Attempts:
3 left
💡 Hint
Common Mistakes
Using versionName instead of versionCode.
Using strings instead of numbers for versionCode.