2014-10-29 188 views
12

这是Android开发新增功能。我试图用目标SDK创建一个新的工作空间作为API 21并编译为API 19。我已经安装了API19和20的sdk,而不是Android5。我创建了一个新的工作空间,并创建了一个新项目,在创建它之后编译项目时,我最终得到了下面的错误。任何人都可以帮我解决这个问题吗?在新工作空间中构建项目时出现错误

错误的详细信息:

Description Resource Path Location Type error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. themes_base.xml /appcompat_v7/res/values-v11 line 352 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. themes_base.xml /appcompat_v7/res/values-v11 line 345 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. themes_base.xml /appcompat_v7/res/values-v11 line 359 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. themes_base.xml /appcompat_v7/res/values-v11 line 338 Android AAPT Problem The project cannot be built until build path errors are resolved SampleApp Unknown Java Problem error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'. themes_base.xml /appcompat_v7/res/values-v21 line 193 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'. themes_base.xml /appcompat_v7/res/values-v21 line 195 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. themes_base.xml /appcompat_v7/res/values-v21 line 191 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. themes_base.xml /appcompat_v7/res/values-v21 line 190 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'. styles_base.xml /appcompat_v7/res/values-v21 line 174 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Toolbar.Button.Navigation'. styles_base.xml /appcompat_v7/res/values-v21 line 93 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Subtitle'. styles_base.xml /appcompat_v7/res/values-v21 line 168 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'. styles_base.xml /appcompat_v7/res/values-v21 line 172 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'. styles_base.xml /appcompat_v7/res/values-v21 line 97 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'. styles_base.xml /appcompat_v7/res/values-v21 line 101 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView'. styles_base.xml /appcompat_v7/res/values-v21 line 121 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView.DropDown'. styles_base.xml /appcompat_v7/res/values-v21 line 107 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'. styles_base.xml /appcompat_v7/res/values-v21 line 138 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListPopupWindow'. styles_base.xml /appcompat_v7/res/values-v21 line 126 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material'. themes_base.xml /appcompat_v7/res/values-v21 line 202 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'. styles_base_text.xml /appcompat_v7/res/values-v21 line 62 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'. styles_base.xml /appcompat_v7/res/values-v21 line 113 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material'. styles_base_text.xml /appcompat_v7/res/values-v21 line 20 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar'. styles_base.xml /appcompat_v7/res/values-v21 line 182 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.DropDownItem.Spinner'. styles_base.xml /appcompat_v7/res/values-v21 line 110 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'. styles_base.xml /appcompat_v7/res/values-v21 line 115 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark.ActionBar'. themes_base.xml /appcompat_v7/res/values-v21 line 223 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'. styles_base.xml /appcompat_v7/res/values-v21 line 154 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display2'. styles_base_text.xml /appcompat_v7/res/values-v21 line 26 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.ActionBar'. themes_base.xml /appcompat_v7/res/values-v21 line 219 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'. styles_base.xml /appcompat_v7/res/values-v21 line 150 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display1'. styles_base_text.xml /appcompat_v7/res/values-v21 line 28 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark'. themes_base.xml /appcompat_v7/res/values-v21 line 205 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display4'. styles_base_text.xml /appcompat_v7/res/values-v21 line 22 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Title'. styles_base.xml /appcompat_v7/res/values-v21 line 164 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Light'. themes_base.xml /appcompat_v7/res/values-v21 line 212 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'. styles_base.xml /appcompat_v7/res/values-v21 line 158 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display3'. styles_base_text.xml /appcompat_v7/res/values-v21 line 24 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Subhead'. styles_base_text.xml /appcompat_v7/res/values-v21 line 34 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.PopupMenu'. styles_base.xml /appcompat_v7/res/values-v21 line 129 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'. themes_base.xml /appcompat_v7/res/values-v21 line 82 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'. styles_base.xml /appcompat_v7/res/values-v21 line 143 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'. styles_base_text.xml /appcompat_v7/res/values-v21 line 36 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'. themes_base.xml /appcompat_v7/res/values-v21 line 84 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'. styles_base.xml /appcompat_v7/res/values-v21 line 146 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Headline'. styles_base_text.xml /appcompat_v7/res/values-v21 line 30 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'. themes_base.xml /appcompat_v7/res/values-v21 line 83 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Title'. styles_base_text.xml /appcompat_v7/res/values-v21 line 32 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.PopupMenu'. styles_base.xml /appcompat_v7/res/values-v21 line 132 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorAccent'. themes_base.xml /appcompat_v7/res/values-v21 line 81 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'. styles_base_text.xml /appcompat_v7/res/values-v21 line 60 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'. styles_base.xml /appcompat_v7/res/values-v21 line 29 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorAccent'. themes_base.xml /appcompat_v7/res/values-v21 line 118 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabText'. styles_base.xml /appcompat_v7/res/values-v21 line 33 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Menu'. styles_base_text.xml /appcompat_v7/res/values-v21 line 42 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'. themes_base.xml /appcompat_v7/res/values-v21 line 120 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Caption'. styles_base_text.xml /appcompat_v7/res/values-v21 line 40 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'. styles_base.xml /appcompat_v7/res/values-v21 line 37 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. themes_base.xml /appcompat_v7/res/values-v21 line 79 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'. styles_base_text.xml /appcompat_v7/res/values-v21 line 38 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'. styles_base.xml /appcompat_v7/res/values-v21 line 41 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. themes_base.xml /appcompat_v7/res/values-v21 line 80 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium'. styles_base_text.xml /appcompat_v7/res/values-v21 line 52 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'. styles_base.xml /appcompat_v7/res/values-v21 line 75 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. themes_base.xml /appcompat_v7/res/values-v21 line 116 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'. styles_base.xml /appcompat_v7/res/values-v21 line 79 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large.Inverse'. styles_base_text.xml /appcompat_v7/res/values-v21 line 50 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. themes_base.xml /appcompat_v7/res/values-v21 line 117 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large'. styles_base_text.xml /appcompat_v7/res/values-v21 line 48 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'. styles_base.xml /appcompat_v7/res/values-v21 line 83 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'. themes_base.xml /appcompat_v7/res/values-v21 line 121 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'. styles_base.xml /appcompat_v7/res/values-v21 line 25 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'. styles_base_text.xml /appcompat_v7/res/values-v21 line 46 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'. themes_base.xml /appcompat_v7/res/values-v21 line 119 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'. styles_base.xml /appcompat_v7/res/values-v21 line 53 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'. themes_base.xml /appcompat_v7/res/values-v21 line 158 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title.Inverse'. styles_base.xml /appcompat_v7/res/values-v21 line 57 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small.Inverse'. styles_base_text.xml /appcompat_v7/res/values-v21 line 58 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'. themes_base.xml /appcompat_v7/res/values-v21 line 156 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small'. styles_base_text.xml /appcompat_v7/res/values-v21 line 56 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse'. styles_base.xml /appcompat_v7/res/values-v21 line 61 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorAccent'. themes_base.xml /appcompat_v7/res/values-v21 line 155 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium.Inverse'. styles_base_text.xml /appcompat_v7/res/values-v21 line 54 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar.Horizontal'. styles_base.xml /appcompat_v7/res/values-v21 line 178 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'. themes_base.xml /appcompat_v7/res/values-v21 line 157 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'. styles_base.xml /appcompat_v7/res/values-v21 line 65 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorAccent'. themes_base.xml /appcompat_v7/res/values-v21 line 192 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Subtitle'. styles_base.xml /appcompat_v7/res/values-v21 line 69 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'. themes_base.xml /appcompat_v7/res/values-v21 line 194 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'. styles_base.xml /appcompat_v7/res/values-v21 line 45 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. themes_base.xml /appcompat_v7/res/values-v21 line 153 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. themes_base.xml /appcompat_v7/res/values-v21 line 154 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'. styles_base.xml /appcompat_v7/res/values-v21 line 49 Android AAPT Problem The container 'Android Dependencies' references non existing library 'D:\Workspace\appcompat_v7\bin\appcompat_v7.jar' SampleApp Build path Build Path Problem error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. themes_base.xml /appcompat_v7/res/values-v14 line 37 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. themes_base.xml /appcompat_v7/res/values-v14 line 29 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. themes_base.xml /appcompat_v7/res/values-v14 line 53 Android AAPT Problem error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'. themes_base.xml /appcompat_v7/res/values-v14 line 45 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material'. themes_base.xml /appcompat_v7/res/values-v21 line 26 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'. themes_base.xml /appcompat_v7/res/values-v21 line 31 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Dialog'. themes_base.xml /appcompat_v7/res/values-v21 line 36 Android AAPT Problem error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light.Dialog'. themes_base.xml /appcompat_v7/res/values-v21 line 41 Android AAPT Problem

回答

0

一花药的事情,你可以尝试是打开Android的支持-V7-程序兼容性的project.properties文件并更改目标目标。然后做一个项目 - >清理,以使更改生效。

1

我得到了一个类似的错误,因为有人刚刚安装Android工具,并错误地选择了Android SDK Manager中的4.4W和4.4.2。

这样会导致安装API 20和API 19,这意味着API 20似乎更新,并且默认情况下会为新项目提取。

但是,API 20仅适用于可穿戴设备。

你可以在screenshot of Navigator Properties这里看到4.4W已经结束了。

appcompat_v7和HelloAndy项目目标都存在此路径问题。

我编辑了project.properties,并将target = android-20更改为target = android-19,然后在两个项目上执行Refresh(右键单击appcompat_v7和其他项目)。这更新了构建路径以指向正确的Android SDK。

21
  1. 更新程序兼容性V7,其具有的project.properties文件:target=android-19target=android-21

  2. 还要更新google play services库(由update我的意思是SDK Manager更新并重新导入等)

+1

#1解决了我的问题。 appcompat_v7项目的目标是4.4.2,因此未能链接v21库。感谢您指点我正确的方向! – 2015-01-24 23:05:23

-1

只要删除该样式行无论发现错误然后清理您的项目

,让你的项目5.0设置好的

0

compiled with的设置应该是相同或更高版本比你target设置。如果您尝试使用不理解api 21的工具来定位api 21,那么当它不起作用时您不应该感到惊讶。

16

右键单击项目属性,然后将项目生成目标更改为5。0

enter image description here

改变目标=机器人-21采用Android 5.0 API级别21

+0

然后清理项目。 – russellhoff 2015-01-17 15:15:03

+1

我已经做了这个,但仍然是相同的错误@krishnan – Erum 2015-01-26 19:12:31

+0

即使,我仍然有这样做后,同样的错误 – NarendraJi 2015-07-15 08:09:26

3

编译项目。

在android应用程序v7库中有一些错误。

创建一个新的工作区,然后创建一个项目。使用相同的步骤,这次你不会发现错误。

0

更改工作区,绝对是你的错误将被纠正您的清单

+0

eclipse工作区与项目编译有关。看看调试行......它在V21中的唯一代码有问题,意味着你至少需要使用android-21进行编译。更改工作区对问题没有影响,这意味着您的项目中有一个脏/ bin目录,可以使用project-> clean进行清理 – 2015-08-29 23:15:55

2

我相信这是一个错误。

我刚刚证实我可以使用Android支持库第20版(使用SDK一直到14)创建新的Hello World应用程序(标准默认值)。但是,它与21.0.3一起失败,上面发布的错误完全相同。

相关问题