问题描述
最近,我收到此错误。
Recently I was receiving this error.
Manifest merger failed : uses-sdk:minSdkVersion 11 cannot be smaller than version L
所以我改成了
minSdkVersion 'L'
然后,我得到这个错误
And then I got this error
失败[INSTALL_FAILED_OLDER_SDK]
Failure [INSTALL_FAILED_OLDER_SDK]
所以我想我没有正确解决的第一个错误。
So I guess I did not resolve the first error correctly.
我不完全知道该怎么做。我一直在关注这一点:
I'm not exactly sure what to do. I've been following this:
Manifest合并失败:使用-SDK:10的minSdkVersion不能比的库中声明L型com.android.support:appcompat-v7:21.0.0-rc1
Manifest合并失败:使用-SDK:14的minSdkVersion
http://www.reddit.com/r/androiddev/comments/297xli/howto_use_the_v21_support_libs_on_older_versions/
但奇怪的是没有运气。
but strangely no luck.
这是我有:
apply plugin: 'android'
android {
compileSdkVersion 21
buildToolsVersion '20.0.0'
defaultConfig {
applicationId 'com.spicycurryman.getdisciplined10.app'
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName '1.0'
}
buildTypes {
debug {
applicationIdSuffix '.dev'
}
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.+'
compile project(':seekArc_library')
}
编辑: 这是我现在使用的是什么的
This is what I am using now
新版本:
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
applicationId 'com.spicycurryman.getdisciplined10.app'
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName '1.0'
}
buildTypes {
debug {
applicationIdSuffix '.dev'
}
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:19.1.+'
compile 'com.android.support:support-v4:19.1.+'
compile project(':seekArc_library')
}
可惜,这是不工作为好。我不知道为什么指定的版本没有被编译。
Unfortunately this is not working as well. I am not sure why the specified version is not being compiled.
推荐答案
我发现,为了逼我的编译器编译指定的版本我需要包括以下内容:
I found out that in order to force my compiler the compile the specified version I need to include the following:
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:20.+'
force 'com.android.support:appcompat-v7:20.+'
}
}
看起来像新Android L移动preVIEW更新的错误。
Seems like a bug with the new Android L preview update.
这篇关于失败[INSTALL_FAILED_OLDER_SDK]从清单合并失败,错误:用途-SDK:15的minSdkVersion不能比L型小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!