问题
Debugging my app with Android Studio 0.8.6, I get the error: "Failure [INSTALL_FAILED_OLDER_SDK]"
My build.gradle looks like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.bla.towerofhanoi"
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 project(':third_party:andengine')
}
回答1:
Add <uses-sdk tools:node="replace" /> in your manifest file and sync project.
回答2:
Check the doc at http://developer.android.com/preview/setup-sdk.html.
You have to use
minSdkVersion 'L'
and you have to run the app in device with Android-L or an emulator with Android-L.
The build system when compileSdkVersion is 'android-L' or targetSdkVersion is 'L' forces the minSdk to 'L' to prevent apps published with the API in preview.
来源:https://stackoverflow.com/questions/25624073/android-studio-0-8-6-failure-install-failed-older-sdk