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

2023-01-03移动开发问题
52

本文介绍了清单合并失败: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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

如何在 COCOS2d Android 中使用 CClistview?
How can I use CClistview in COCOS2d Android?(如何在 COCOS2d Android 中使用 CClistview?)...
2024-08-12 移动开发问题
5

cocos2d-android:如何显示分数
cocos2d-android: how to display score(cocos2d-android:如何显示分数)...
2024-08-11 移动开发问题
7

Sqlite 数据库未从资产文件夹 Android 复制
Sqlite database not copied from asset folder Android(Sqlite 数据库未从资产文件夹 Android 复制)...
2024-04-15 移动开发问题
8

SQLite 数据库副本在由设备而不是模拟器生成时出现损坏
SQLite Database Copy Appears Corrupted When Generated by Device and not Emulator(SQLite 数据库副本在由设备而不是模拟器生成时出现损坏)...
2024-04-15 移动开发问题
4

安卓文件拷贝
Android file copy(安卓文件拷贝)...
2024-04-15 移动开发问题
6

Android如何在android中检测Edittext的Copy事件
Android how to detect Copy event of Edittext in android(Android如何在android中检测Edittext的Copy事件)...
2024-04-15 移动开发问题
5