我对eclipse的android开发很新,我遇到了十几个错误和问题。这是下一个:
我正在按照here给出的教程。我即将进入会话Setting Up the Action Bar ,并按照“支持Android 2.1及以上版本”的说明操作,因为我相信我的手机的Android版本低于3.因此,我按照给出的{{3}指示},在“使用资源添加库”子节中。我成功地完成了所有步骤,但在“将库添加到您的应用程序项目”的最后一步(步骤5)之后,在我的项目中弹出了一个红色感叹号,并且控制台中充满了许多错误消息(如下所示)。
这次我做错了什么?也许我试着加两次东西?那么如何恢复我的行为呢?或者教程(再次)是不正确的?
控制台输出(部分):
[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
附录:我的TestApp的Android属性:
也许我两次使用这个愚蠢的appcompat_v7?我应该删除其中一个吗?如果是这样,哪个?通过上述步骤添加了android-support-v7
。
答案 0 :(得分:0)
您需要删除android-support-v7库。我不知道为什么有时会出现第二个图书馆的原因。但你删除它并解决了。