【发布时间】:2021-09-05 20:29:50
【问题描述】:
我正在使用 API 级别 30 的 Android 手机中安装目标 sdk 版本为 android S 的 Android 应用。我的应用默认配置设置如下
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"
}
但是当我在具有 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.
如何解决这个问题?需要修改哪些内容才能使其正常工作?
【问题讨论】:
标签: android android-min-sdk target-sdk android-12