我有一个问题 - 我在 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/