【发布时间】:2020-02-25 09:35:35
【问题描述】:
我将我的 SDK 版本更新到最新的 API 级别 30 (R),即所谓的 Android 11。现在,它在 Android R 模拟器中运行完美,但是当我尝试在棉花糖版本上运行时,它给出了以下异常。我试图删除所有 SDK 并清理/重建项目,使缓存/重启无效。
**Exception:**
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 R 上运行。我该怎么办?
android {
compileSdkVersion 'android-R'
defaultConfig {
applicationId "com.lifetrenz.lifetrenz_gcc_doctorapp"
minSdkVersion 21
targetSdkVersion 'R'
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
我想测试从 API 21 到 API R 的 App
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//Lifecycle components
def life_versions = "2.2.0-beta01"
implementation "android.arch.lifecycle:extensions:$life_versions"
annotationProcessor "android.arch.lifecycle:compiler:$life_versions"
//Server API Integration
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
implementation "com.squareup.okhttp3:logging-interceptor:4.4.0"
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.7.1'
//For QR Scanner
implementation 'com.google.android.gms:play-services-vision:19.0.0'
}
【问题讨论】:
-
从错误中,您的设备似乎正在运行 android
-
@NikosHidalgo 6.0.1 是 23 对吗?
-
你能发布依赖列表吗?也许其他东西正在迫使更新的 minSdk
标签: android