Android 在新工作区中构建项目时出错

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26623083/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 11:58:45  来源:igfitidea点击:

Got an error while building a project in new workspace

androideclipse

提问by Harikrishnan

Am new for android development. I tried to create a new workspace with Target SDK as API 21 and Compiled with API 19. I have installed the sdk of API19 and 20 and not the Android5. I created a new workspace and created a new project in which I ended up with the below error while compiling the project after creating it. Can anyone help me how to get rid of this?

是 android 开发的新手。我尝试使用Target SDK 作为 API 21 和 Compiled with API 19创建一个新工作区。我已经安装了API19 和 20的 sdk而不是 Android5。我创建了一个新工作区并创建了一个新项目,在创建项目后编译项目时,最终出现以下错误。谁能帮我解决这个问题?

Error details:

错误详情:

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

说明 资源路径位置类型错误:错误:找不到与给定名称匹配的资源:attr 'android:actionModeShareDrawable'。themes_base.xml /appcompat_v7/res/values-v11 line 352 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:actionModeShareDrawable'。themes_base.xml /appcompat_v7/res/values-v11 line 345 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:actionModeShareDrawable'。themes_base.xml /appcompat_v7/res/values-v11 line 359 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:actionModeShareDrawable'。主题库。xml /appcompat_v7/res/values-v11 line 338 Android AAPT 问题 在解决构建路径错误之前无法构建项目 SampleApp Unknown Java 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorControlNormal'。themes_base.xml /appcompat_v7/res/values-v21 line 193 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorControlHighlight'。themes_base.xml /appcompat_v7/res/values-v21 line 195 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorPrimaryDark'。themes_base.xml /appcompat_v7/res/values-v21 line 191 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorPrimary'。themes_base.xml /appcompat_v7/res/values-v21 line 190 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.AutoCompleteTextView”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 174 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.Toolbar.Button.Navigation”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 93 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“@android:TextAppearance.Material.SearchResult.Subtitle”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 168 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.AutoCompleteTextView”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 172 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.ActionBar.Title”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 97 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.ActionBar.Subtitle”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 101 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.ListView”匹配的资源。样式_基础。xml /appcompat_v7/res/values-v21 line 121 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.ListView.DropDown”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 107 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:overlapAnchor'。style_base.xml /appcompat_v7/res/values-v21 line 138 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.ListPopupWindow”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 126 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:ThemeOverlay.Material”匹配的资源。主题库。xml /appcompat_v7/res/values-v21 line 202 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Button”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 62 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.Spinner”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 113 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 20 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.xml”匹配的资源。Material.ProgressBar'。style_base.xml /appcompat_v7/res/values-v21 line 182 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.DropDownItem.Spinner”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 110 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.Spinner”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 115 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:ThemeOverlay.Material.Dark.ActionBar”匹配的资源。themes_base.xml /appcompat_v7/res/values-v21 line 223 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.PopupMenu.Large”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 154 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Display2”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 26 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:ThemeOverlay.Material.ActionBar”匹配的资源。themes_base.xml /appcompat_v7/res/values-v21 line 219 Android AAPT 问题错误:检索父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.PopupMenu.Small”匹配的资源。样式_基础。xml /appcompat_v7/res/values-v21 line 150 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Display1”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 28 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:ThemeOverlay.Material.Dark”匹配的资源。themes_base.xml /appcompat_v7/res/values-v21 line 205 Android AAPT 问题错误:检索父项时出错:找不到与给定名称“android:TextAppearance.Material.Display4”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 22 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称匹配的资源' @android:TextAppearance.Material.SearchResult.Title'。style_base.xml /appcompat_v7/res/values-v21 line 164 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:ThemeOverlay.Material.Light”匹配的资源。themes_base.xml /appcompat_v7/res/values-v21 line 212 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.PopupMenu.Small”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 158 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Display3”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 24 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Subhead”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 34 Android AAPT 问题错误:检索父项时出错:找不到与给定名称“android:Widget.Material.PopupMenu”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 129 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorControlNormal'。themes_base.xml /appcompat_v7/res/values-v21 line 82 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:overlapAnchor'。style_base.xml /appcompat_v7/res/values-v21 line 143 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Body2”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 36 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorControlHighlight'。themes_base.xml /appcompat_v7/res/values-v21 line 84 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.PopupMenu.Large”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 146 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Headline”匹配的资源。样式_基础_文本。xml /appcompat_v7/res/values-v21 line 30 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorControlActivated'。themes_base.xml /appcompat_v7/res/values-v21 line 83 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Title”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 32 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.Light.PopupMenu”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 132 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorAccent'。主题库。xml /appcompat_v7/res/values-v21 line 81 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Button”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 60 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.Light.ActionBar.TabView”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 29 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorAccent'。themes_base.xml /appcompat_v7/res/values-v21 line 118 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.ActionBar”匹配的资源。标签文本'。style_base.xml /appcompat_v7/res/values-v21 line 33 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Menu”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 42 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorControlActivated'。themes_base.xml /appcompat_v7/res/values-v21 line 120 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Caption”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 40 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称匹配的资源' android:Widget.Material.Light.ActionBar.TabText'。style_base.xml /appcompat_v7/res/values-v21 line 37 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorPrimary'。themes_base.xml /appcompat_v7/res/values-v21 line 79 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Body1”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 38 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.Light.ActionBar.TabText”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 41 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorPrimaryDark'。themes_base.xml /appcompat_v7/res/values-v21 line 80 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Medium”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 52 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.ActionButton”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 75 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorPrimary'。themes_base.xml /appcompat_v7/res/values-v21 line 116 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.ActionButton.CloseMode”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 79 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Large.Inverse”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 50 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorPrimaryDark'。themes_base.xml /appcompat_v7/res/values-v21 line 117 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Large”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 48 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.ActionButton.Overflow”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 83 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorControlHighlight'。themes_base.xml /appcompat_v7/res/values-v21 line 121 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.ActionBar.TabView”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 25 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Inverse”匹配的资源。样式_基础_文本。xml /appcompat_v7/res/values-v21 line 46 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorControlNormal'。themes_base.xml /appcompat_v7/res/values-v21 line 119 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.ActionBar.Subtitle”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 53 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorControlHighlight'。themes_base.xml /appcompat_v7/res/values-v21 line 158 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.ActionBar.Title”匹配的资源。逆'。style_base.xml /appcompat_v7/res/values-v21 line 57 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Small.Inverse”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 58 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorControlNormal'。themes_base.xml /appcompat_v7/res/values-v21 line 156 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Small”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 56 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android”匹配的资源:TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse'。style_base.xml /appcompat_v7/res/values-v21 line 61 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorAccent'。themes_base.xml /appcompat_v7/res/values-v21 line 155 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Medium.Inverse”匹配的资源。style_base_text.xml /appcompat_v7/res/values-v21 line 54 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.ProgressBar.Horizo​​ntal”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 178 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorControlActivated'。themes_base.xml /appcompat_v7/res/values-v21 line 157 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.ActionMode.Title”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 65 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorAccent'。themes_base.xml /appcompat_v7/res/values-v21 line 192 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.ActionMode.Subtitle”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 69 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorControlActivated'。themes_base.xml /appcompat_v7/res/values-v21 line 194 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.ActionBar.Menu”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 45 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorPrimary'。themes_base.xml /appcompat_v7/res/values-v21 line 153 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:colorPrimaryDark'。themes_base.xml /appcompat_v7/res/values-v21 line 154 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.ActionBar.Title”匹配的资源。style_base.xml /appcompat_v7/res/values-v21 line 49 Android AAPT 问题容器'Android Dependencies' 引用了非现有库'D:\Workspace\appcompat_v7\bin\appcompat_v7.jar' SampleApp Build path Build Path Problem error: Error:找不到与给定名称匹配的资源:attr 'android:actionModeShareDrawable'。themes_base.xml /appcompat_v7/res/values-v14 line 37 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:actionModeShareDrawable'。themes_base.xml /appcompat_v7/res/values-v14 line 29 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr ' android:actionModeShareDrawable'。themes_base.xml /appcompat_v7/res/values-v14 line 53 Android AAPT 问题错误:错误:找不到与给定名称匹配的资源:attr 'android:actionModeShareDrawable'。themes_base.xml /appcompat_v7/res/values-v14 line 45 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Theme.Material”匹配的资源。themes_base.xml /appcompat_v7/res/values-v21 line 26 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Theme.Material.Light”匹配的资源。themes_base.xml /appcompat_v7/res/values-v21 line 31 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Theme.xml”匹配的资源。Material.Dialog'。themes_base.xml /appcompat_v7/res/values-v21 line 36 Android AAPT 问题错误:检索项目的父项时出错:找不到与给定名称“android:Theme.Material.Light.Dialog”匹配的资源。themes_base.xml /appcompat_v7/res/values-v21 line 41 Android AAPT 问题

回答by Androider

  1. Update the project.properties file of appcompat v7, which has:target=android-19to target=android-21

  2. Also update google play serviceslibrary (by updateI mean update it in SDK Managerand re-import etc)

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

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

回答by krishnan

Right click project properties and change project Build Target To 5.0

右键单击项目属性并将项目构建目标更改为 5.0

enter image description here

在此处输入图片说明

change target=android-21 in your manifest

在清单中更改 target=android-21

回答by DjP

compile project with Android 5.0 API leveL 21.

使用 Android 5.0 API 级别 21 编译项目。

回答by Jimi

I believe this is a bug.

我相信这是一个错误。

I just verified that I can create a new Hello World app ( the standard default ) just fine with Version 20 of Android Support Library ( using SDK all the way down to 14 ). However, it fails with 21.0.3 with the exact same errors that you posted above.

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

回答by Andy Dent

I got a similar error as someone new to installing Android tools and having mistakenly selected the 4.4W as well as 4.4.2 in the Android SDK Manager.

我遇到了与安装 Android 工具的新手类似的错误,并且在 Android SDK 管理器中错误地选择了 4.4W 和 4.4.2。

This results in having both API 20 and API 19 installed which means API 20 seems to be newer and will be picked up by default for new projects.

这导致同时安装了 API 20 和 API 19,这意味着 API 20 似乎更新了,并且默认情况下将被用于新项目。

However, API 20 is Wearables Only.

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

You can see here in screenshot of Navigator Propertiesthat 4.4W has ended up in the path.

您可以在此处screenshot of Navigator Properties看到 4.4W 已在路径中结束。

Both the appcompat_v7 and HelloAndy project targets had this path problem.

appcompat_v7 和 HelloAndy 项目目标都有这个路径问题。

I edited project.properties for both and changed target=android-20 to target=android-19 then did a Refresh on both projects (right-click the appcompat_v7 and other project). That updated the build paths to point to the correct Android SDK.

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

回答by j__m

Your compiled withsetting should be the same or later than your targetsetting. If you try to target api 21 with tools that don't understand api 21, you shouldn't be surprised when it doesn't work.

您的compiled with设置应该与您的target设置相同或晚于您的设置。如果您尝试使用不理解 api 21 的工具来定位 api 21,当它不起作用时您不应该感到惊讶。

回答by Kartheek s

Change the workspace and definitely your error will be rectified.

更改工作区,您的错误肯定会得到纠正。

There is some bug in android app v7 library.

android app v7 库中存在一些错误。

Create a new workspace and then create a project. Use the same steps and you will not find an error this time.

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

回答by QArea

Did you change the project's build target to Android 4.4.2 too?

您是否也将项目的构建目标更改为 Android 4.4.2?

Here guys had the same problem: https://stackoverflow.com/a/14843198/3864698

这里的人有同样的问题:https: //stackoverflow.com/a/14843198/3864698

回答by Muhammad Ebad

One anther thing you can try is to open the project.properties file of the android-support-v7-appcompat and change the target target. And then just do a Project --> Clean so that the changes take effect.

您可以尝试的另一件事是打开 android-support-v7-appcompat 的 project.properties 文件并更改目标目标。然后只需执行一个 Project --> Clean 即可使更改生效。

回答by Sikandar Ejaz

I have had the same problem and tried all the solutions provided on stackoverflow, but non of them worked for me. Finally I came across this solution

我遇到了同样的问题并尝试了 stackoverflow 上提供的所有解决方案,但没有一个对我有用。最后我遇到了这个解决方案

https://stackoverflow.com/a/33505965/3840615

https://stackoverflow.com/a/33505965/3840615

and it worked for me.

它对我有用。