由于下载最新的SDK和安装Android的工作室,我的项目未能建立。我得到以下信息:
错误:摇篮:执行失败的任务:SampleProject:processProdDebugManifest。
>清单合并失败:使用-SDK:的minSdkVersion 14不能比L型小图书馆com.android.support:support-v4:21.0.0-rc1声明
解决方案
注意:这已被更新,以反映API 21,棒棒堂的释放。请务必下载最新的SDK。
在我的模块中的一个我曾在build.gradle如下:
相关性{
编译com.android.support:support-v4:+
}
更改为
相关性{
//不使用动态更新。
编译com.android.support:support-v4:21.0.0
}
固定的问题。
请确保你没有做一般包含 com.android.support:support-v4的:+
或其它任何支持库(V7,V13,appcompat,等),在任何地方你的项目。
我认为这个问题是 V4 +
拿起发布候选版(21.0.0-RC1)最新大号释放这明显要求第l SDK。
编辑:
如果您需要使用新的意见(CardView,RecyclerView,和调色板),以下应该工作:
编译com.android.support:cardview-v7:21.0.0
编译com.android.support:recyclerview-v7:21.0.0
编译com.android.support:palette-v7:21.0.0
(感谢EddieRingle上/ androiddev - http://www.reddit.com/r/androiddev/comments/297xli/howto_use_the_v21_support_libs_on_older_versions/)
另一个修改
请务必看到有关appcompat-V7和upvote它是否有助于低于@ murtuza的答案!
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
解决方案
Note: This has been updated to reflect the release of API 21, Lollipop. Be sure to download the latest SDK.
In one of my modules I had the following in build.gradle:
dependencies {
compile 'com.android.support:support-v4:+'
}
Changing this to
dependencies {
// do not use dynamic updating.
compile 'com.android.support:support-v4:21.0.0'
}
fixed the issue.
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.
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.
Edit:
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"
(Credit to EddieRingle on /androiddev - http://www.reddit.com/r/androiddev/comments/297xli/howto_use_the_v21_support_libs_on_older_versions/)
Another Edit
Be sure to see @murtuza's answer below regarding appcompat-v7 and upvote if it helps!