android - list 合并失败 : uses-sdk:minSdkVersion 9 cannot be smaller than version L declared in library com. android.support

标签 android gradle android-studio android-5.0-lollipop

我有一个问题 - 我在 Android Studio 中导入了项目。当我运行该项目时,出现以下错误:

错误:任务“:driverNotes:processDebugManifest”执行失败。

Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1

android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
    minSdkVersion 9
    targetSdkVersion 19
}

build.gradle 中的依赖:

dependencies {
    compile project(':facebookSDK')
    compile project(':vKOpenAuthActivity')
    compile project(':easyFousquareActivity')
    compile project(':pullToRefresh')
    compile project(':volley') 
    compile 'com.android.support:appcompat-v7:20.+'
    compile 'com.android.support:support-v4:20.+'
    compile 'com.google.android.gms:play-services:+'   
    compile files('libs/commons-codec-1.9.jar')
    compile files('libs/signpost-commonshttp-1.2.1.1.jar')
    compile files('libs/signpost-core-1.2.1.2.jar')
    compile files('libs/twitter4j-core-4.0.1.jar')
    compile files('libs/nineoldandroids-2.4.0.jar')
    compile files('libs/gson-2.2.4.jar')
    compile files('libs/httpclientandroidlib-1.2.0.jar')

}

我使用的是 java 7。我怎样才能摆脱这个错误消息?

最佳答案

Android L 预览版无法针对以前的 Android 版本。我认为 com.android.support:support-v4:21.0.0-rc1 是为 Android L Preview 构建的,尝试将版本更改为 20+ pending v21 release

编辑:

Google Play 服务可能包含 android-support-v4:21.0.0-rc1 。避免在 gradle 依赖项中使用 +(我只将它用于次要版本),Google Play Services 的最新版本是 Android L Preview 的 5.2.08,尝试替换 compile 'com.google.android.gms:play-services :+'compile 'com.google.android.gms:play-services:5.0.89'

关于android - list 合并失败 : uses-sdk:minSdkVersion 9 cannot be smaller than version L declared in library com. android.support,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25377969/

相关文章:

android - 运行一次 kotlin 流,但在下游接收两次

Android Studio 构建 2 个包含相同包的依赖项

android-studio - gradle项目同步失败的Android Studio 3.1.2

java - 如何在Android Studio中跳转到Android实现源文件

android - 在 windows 10 中找不到 tools.jar React Native Android

android - 带有桌面、android 和 ios 客户端的 java-ee 应用程序

java - org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为 'voteService'的bean时出错

java - AlertDialog 使用 EditText 强制关闭

android - textViewResourceId 参数是否总是必要的?

eclipse - 从服务器收到状态码408:请求超时,即使服务器启动后