清单合并失败:uses-sdk:minSdkVersion 14

Manifest merger failed : uses-sdk:minSdkVersion 14(清单合并失败:uses-sdk:minSdkVersion 14)
本文介绍了清单合并失败:uses-sdk:minSdkVersion 14的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于下载了最新的 SDK 并安装了 Android Studio,我的项目构建失败.我收到以下消息:

Since downloading the latest SDK and installing Android Studio, my project fails to build. I get the following message:

Error:Gradle: Execution failed for task ':SampleProject:processProdDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1

推荐答案

注意:这已更新以反映 API 21 Lollipop 的发布.请务必下载最新的 SDK.

在我的一个模块中,我在 build.gradle 中有以下内容:

In one of my modules I had the following in build.gradle:

dependencies {
    compile 'com.android.support:support-v4:+'
}

改成

dependencies {
    // do not use dynamic updating.
    compile 'com.android.support:support-v4:21.0.0' 
}

解决了这个问题.

确保您没有在您的任何地方都包含 com.android.support:support-v4:+ 或任何其他支持库(v7、v13、appcompat 等)项目.

Make sure you're not doing a general inclusion of com.android.support:support-v4:+ or any other support libraries (v7, v13, appcompat, etc), anywhere in your project.

我认为问题是 v4:+ 选择了 release Candidate (21.0.0-rc1) 最新的 L 版本,这显然需要 L SDK.

I'd assume the problem is v4:+ picks up the release candidate (21.0.0-rc1) latest L release which obviously requires the L SDK.

如果您需要使用新视图(CardView、RecyclerView 和 Palette),以下应该可以工作:

If you need to use the new views (CardView, RecyclerView, and Palette), the following should work:

compile "com.android.support:cardview-v7:21.0.0"
compile "com.android.support:recyclerview-v7:21.0.0"
compile "com.android.support:palette-v7:21.0.0"

(归功于/androiddev 上的 EddieRingle - http://www.reddit.com/r/androiddev/comments/297xli/howto_use_the_v21_support_libs_on_older_versions/)

(Credit to EddieRingle on /androiddev - http://www.reddit.com/r/androiddev/comments/297xli/howto_use_the_v21_support_libs_on_older_versions/)

另一个编辑

请务必在下面查看 @murtuza 关于 appcompat-v7 的回答,如果有帮助,请点赞!

Be sure to see @murtuza's answer below regarding appcompat-v7 and upvote if it helps!

这篇关于清单合并失败:uses-sdk:minSdkVersion 14的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)