I can use API R via Android Studio Emulator. I know I can run directly from Android Studio but still I want to set in Gradle level.
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.example.test"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Now that the Android 11 (also known as Android R) SDK is released, the compile SDK version is simply 30
:
android {
compileSdkVersion 30
defaultConfig {
targetSdkVersion 30 // Optional: If you want to target R as well
// ...
}
// ...
}
No longer applicable:
When Android R was in the preview stage, the compile SDK version was 'android-R'
and the target SDK version was 'R'
:
android {
compileSdkVersion 'android-R'
defaultConfig {
targetSdkVersion 'R' // Optional: If you want to target R as well
// ...
}
// ...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With