Reputation: 11
Failed to commit install session 1846176067 with command cmd package install-commit 1846176067. Error: INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /data/app/vmdl1846176067.tmp/base.apk (at Binary XML file line #7): Requires newer sdk version #28 (current version is #25)
My Gradle apply plugin: 'com.android.application'
android { compileSdkVersion 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'
}
}
}
dependencies { implementation fileTree(dir: 'libs', include: ['*.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'
}
Please help me to solve the issue .
Upvotes: 1
Views: 3708
Reputation: 312
Check your emulator or physical device Android version, it should be more or less your min sdk version in build.gradle.
The answer is here "#28 (current version is #25)".
Modify your project build.gradle.
Upvotes: 0
Reputation: 1274
You have given minSdkVersion 28
which means, to run the app the device must be atleast having android P. As mentioned in the error you are trying to run the app in device running on API level 25 which is android N.To solve the isssue either you can change the minSdkVersion to 25 (minSdkVersion 25
) or you have to run the app in a device which is running on android pie or higher.
Upvotes: 2