添加库为的&QUOT安卓给予十几资源;已经被定义"错误 [英] Adding libraries with resources for android give dozen of "has already been defined" errors

查看:183
本文介绍了添加库为的&QUOT安卓给予十几资源;已经被定义"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是很新的,用eclipse android开发,和我遇到的错误和问题的打。这里是下一个:

I am very new to android development with eclipse, and I encounter dozen of errors and problems. Here is the next one:

我在这里以下教程给出。我正要进入会话设置操作栏,并遵循支持Android 2.1及以上的说明,因为我相信我的手机有低于3的Andr​​oid版本。因此,我也跟着给出的此处,在次节'添加库的资源。我成功地执行了所有步骤,但在最后一步之后库添加到您的应用程序项目(第5步)红色感叹号在我的项目突然出现了,并在控制台中充满了许多错误消息(如下所示)。

I am following the tutorial given here. I was about to enter the session Setting Up the Action Bar , and to follow the instructions for 'Support Android 2.1 and Above', as I believe my phone has an android version below 3. Therefore, I followed the instructions given here, in the sub section 'Adding libraries with resources'. I successfully followed all steps, but after the last step for 'Add the library to your application project' (step 5) a red exclamation mark popped up at my project, and the console was filled with many error messages (listed below).

我有什么做错了这个时间呢?也许我想补充一点两次?如何恢复我的行动呢?或者是教程(再次)不正确的?

What have I done wrong this time? Maybe I tried to add something twice? How to revert my actions then? Or is the tutorial (again) incorrect?

控制台输出(部分):

[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:530: error: Attribute "searchViewGoIcon" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:532: error: Attribute "searchViewSearchIcon" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:534: error: Attribute "searchViewVoiceIcon" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:536: error: Attribute "searchViewEditQuery" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:538: error: Attribute "searchViewEditQueryBackground" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:540: error: Attribute "searchViewTextField" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:542: error: Attribute "searchViewTextFieldRight" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:544: error: Attribute "searchResultListItemHeight" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:546: error: Attribute "textAppearanceSearchResultTitle" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:548: error: Attribute "textAppearanceSearchResultSubtitle" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:550: error: Attribute "textColorSearchUrl" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:552: error: Attribute "searchViewAutoCompleteTextView" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:557: error: Attribute "initialActivityCount" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:564: error: Attribute "expandActivityOverflowButtonDrawable" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:568: error: Attribute "activityChooserViewStyle" has already been defined
[2014-07-17 20:45:00 - TestApp] /home/alexander/Projects/Eclipse/appcompat_v7/res/values/attrs.xml:572: error: Attribute "textAllCaps" has already been defined

附录:Android的属性我TestApp:

Addendum: Android Properties for my TestApp:

也许我使用这个愚蠢appcompat_v7两次?我应该删除其中之一吗?如果是这样,哪个?在 Android的支持-V7 已添加的步骤如上所述。

Maybe I am using this stupid appcompat_v7 twice? Should I remove one of them? If so, which? The android-support-v7 has been added by the steps as explained above.

推荐答案

您需要删除Android的支持-V7库。我不知道为什么原因,这第二个库有时会出现。但是你删除此,并就解决了。

You need to remove android-support-v7 library. I don't know why reason this second library appear sometimes. But you remove this and is solved.

这篇关于添加库为的&QUOT安卓给予十几资源;已经被定义"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆