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')
}
在清单文件中添加<uses-sdk tools:node="replace" />
并同步项目。
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.