Failure [INSTALL_FAILED_OLDER_SDK] Android Studio
Solution 1:
Unless you know you want to be using the Android L developer preview with your application, do not target and compile with it. It is still very much a preview release, and it appears as though applications targeting and compiling for the preview cause this error with any non-L device.
Update these lines in your build.gradle to stick with the latest stable release (Android 4.4, API 19):
android {
compileSdkVersion 19
defaultConfig {
targetSdkVersion 19
}
}
Solution 2:
I fixed this problem. I just modified the compileSdkVersion from android_L to 19 to target my nexus 4.4.4.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
}
}
apply plugin: 'com.android.application'
repositories {
jcenter()
}
android {
**compileSdkVersion 'android-L'** modified to 19
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.antwei.uiframework.ui"
minSdkVersion 14
targetSdkVersion 'L'
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
**compile 'com.android.support:support-v4:21.+'** modified to compile 'com.android.support:support-v4:20.0.0'
}
how to modified the value by ide. select file->Project Structure -> Facets -> android-gradle and then modified the compile Sdk Version from android_L to 19
sorry I don't have enough reputation to add pictures
Solution 3:
I think projects with
compileSdkVersion 'android-L'
cannot be installed in other Android versions right now. I might be wrong there but if you're not doing anything specific to the L preview SDK, just set the compile version to one of the official ones. Same goes for the targetSdk.
You can choose those in the Create Project wizard.