我正在Api级别为30的安卓手机中安装目标sdk版本为Android S的安卓应用程序。我的应用程序默认配置设置类似
compileSdkVersion 'android-S'
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.test"
minSdkVersion 21
targetSdkVersion "S"
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
但是当我在Emulator中安装Api Level 30的apk时,我会收到错误
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_OLDER_SDK
The application's minSdkVersion is newer than the device API level.
如何解决此问题?哪些东西需要修改才能使其工作?
targetSdkVersion"S〃;
使用初始版本时,minSdkVersion也会自动变为S。
更改为此版本有效
compileSdkVersion 'android-S'
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.test"
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}