无法安装该应用程序:INSTALL_FAILED_OLDER_SDK,

时间:2020-05-24 13:37:53

标签: android sdk

无法使用命令cmd软件包install-commit 1846176067提交安装会话1846176067。错误:INSTALL_FAILED_OLDER_SDK:installPackageLI期间解析失败:/data/app/vmdl1846176067.tmp/base.apk(在二进制XML文件行#7):需要较新的SDK版本#28(当前版本为#25)

我的摇篮 应用插件:“ com.android.application”

android { 编译版本29 buildToolsVersion“ 29.0.3”

defaultConfig {
    applicationId "com.example.myapplication"
    minSdkVersion 28
    targetSdkVersion 29
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}

}

依赖项{ 实现fileTree(dir:'libs',包括:['* .jar'])

implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

}

请帮助我解决问题。

1 个答案:

答案 0 :(得分:0)

您给了minSdkVersion 28,这意味着要运行该应用,设备必须至少具有androidP。如错误所述,您正尝试在API级别25(即android N)上运行的设备中运行该应用要解决该问题,您可以将minSdkVersion更改为25(minSdkVersion 25),或者必须在运行于Android Pie或更高版本的设备上运行该应用。