【发布时间】:2014-08-24 03:17:58
【问题描述】:
最近我收到了这个错误。
Manifest merger failed : uses-sdk:minSdkVersion 11 cannot be smaller than version L
所以我改成
minSdkVersion 'L'
然后我得到了这个错误
失败 [INSTALL_FAILED_OLDER_SDK]
所以我想我没有正确解决第一个错误。
我不确定该怎么做。我一直在关注这个:
Manifest merger failed : uses-sdk:minSdkVersion 14
http://www.reddit.com/r/androiddev/comments/297xli/howto_use_the_v21_support_libs_on_older_versions/
但奇怪的是没有运气。
这就是我所拥有的:
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')
}
编辑: 这就是我现在使用的
新版本:
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')
}
不幸的是,这也不起作用。我不确定为什么没有编译指定的版本。
【问题讨论】:
-
您安装了哪些 API?你是在模拟器还是设备上运行?哪个 API 在模拟器/设备上运行?
-
我拥有 21 之前的所有内容。三星 Galaxy s4。我正在尝试运行 19
-
另外,请仅在您的帖子中包含当前的 build.gradle 文件。目前还不清楚你为什么在这里有两个。
-
由于 L 在设备上不可用,您需要将 minSdkVersion 设置为小于或等于设备上运行的值。要了解您拥有的 Android 版本,您可以前往应用程序->设置->手机。 Android 版本应在此处列出。
-
我这样做到 19 并且我仍然收到一个错误,说清单合并失败使用 -sdk minSdkVersion 14 不能小于库 com.android 中声明的版本 L。支持-v4:21.0.0-rc1
标签: android android-studio android-gradle-plugin build.gradle android-5.0-lollipop