I have a device with android version 10.
Also, I have an emulator with API 22
this is a part of my build.gradle(:app) file:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
android {
dataBinding {
enabled = true
}
compileSdkVersion 'android-R'
defaultConfig {
applicationId "com.example.android.sOnline"
minSdkVersion 17
targetSdkVersion 'R'
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
// android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true
}
}
It just not working on 'android-R'
Thank you for helping me :)
Starting in November 2022, app updates must target API level 31 or above and adjust for behavioral changes in Android 12; except for Wear OS apps, which must target API level 30 or higher. Note: Starting in 2022, some out-of-date apps will be unavailable to new users of devices that run newer versions of Android.
What is API Level? API Level is an integer value that uniquely identifies the framework API revision offered by a version of the Android platform. The Android platform provides a framework API that applications can use to interact with the underlying Android system.
To change Android minSdkVersion in Flutter for the project created after the 2.8 update, you have to make changes in the local. properties file and then reference the new variable from the local. properties file inside the build. gradle file.
The real difference is that an API is really just an interface for a service, while an SDK is the tools/components/code fragments that have been created for a specific purpose.
targetSdkVersion "R"
will restrict your app to only running on Android R, by artificially raising your minSdkVersion
to R
. This has been the case for the past several years: each developer preview only supports running the app on the developer preview itself, not older devices.
Sometime later this year, we will be able to switch to using targetSdkVersion 30
, at which point normal behavior returns with respect to minSdkVersion
.
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