✅ The correct answer is:
- defaultConfig {
…
minSdkVersion 21
targetSdkVersion 28
}
Question:
How would you specify in your build.gradle file that your app required at least API level 21 to run, but that it can be tested on API level 28?
Solution:
- defaultConfig {
…
minApiVersion 21
targetApiVersion 28
} - defaultConfig {
…
targetSdkVersion 21
testSdkVersion 28
} - defaultConfig {
…
minSdkVersion 21
testApiVersion 28
} - defaultConfig {
…
minSdkVersion 21
targetSdkVersion 28
}