Hello World Android应用程序,错误:workspace \ appcompat_v7 \ res \ values-v21 \ styles_base.xml找不到与给定名称匹配的资源

时间:2014-10-22 22:22:07

标签: java android xml eclipse

我是一个刚进入Android开发的新手。我正在浏览官方Android开发人员网页上的"Building your first app“教程。我按照所有说明进行了操作,但它在Eclipse中显示了这个错误代码。错误信息真的很长,我猜我的问题肯定有问题设置,SDK或环境。有人可以帮我解决这个问题吗?为了您的信息,我的目标SDK是API19,我也用API19编译它

[2014-10-22 17:13:51 - appcompat_v7] WARNING: unable to write jarlist cache file C:\Users\Cliff\workspace\appcompat_v7\bin\jarlist.cache
[2014-10-22 17:13:51 - appcompat_v7] WARNING: unable to write jarlist cache file C:\Users\Cliff\workspace\appcompat_v7\bin\jarlist.cache
[2014-10-22 17:13:51 - appcompat_v7] WARNING: unable to write jarlist cache file C:\Users\Cliff\workspace\appcompat_v7\bin\jarlist.cache
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:79: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:83: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:25: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:29: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:33: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabText'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:37: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:41: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:65: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:69: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Subtitle'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:45: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:49: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:53: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:57: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title.Inverse'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:61: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:178: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar.Horizontal'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:182: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:113: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:115: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:110: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.DropDownItem.Spinner'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:107: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView.DropDown'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:121: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:126: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListPopupWindow'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:138: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:143: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:129: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.PopupMenu'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:132: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.PopupMenu'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:146: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:150: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:154: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:158: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:164: error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Title'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:168: error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Subtitle'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:172: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:174: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:93: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Toolbar.Button.Navigation'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:97: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:101: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:62: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:22: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display4'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:24: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display3'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display2'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:28: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display1'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:30: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Headline'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:32: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Title'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:34: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Subhead'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:36: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:38: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:40: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Caption'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:42: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Menu'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:60: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:46: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:48: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:50: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large.Inverse'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:52: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:54: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium.Inverse'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:56: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base_text.xml:58: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small.Inverse'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:31: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:36: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Dialog'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:41: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light.Dialog'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v11\themes_base.xml:338: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v14\themes_base.xml:29: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v11\themes_base.xml:345: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v14\themes_base.xml:37: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v11\themes_base.xml:352: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v14\themes_base.xml:45: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v11\themes_base.xml:359: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v14\themes_base.xml:53: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:202: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:212: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Light'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:205: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:219: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.ActionBar'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:223: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark.ActionBar'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:81: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:83: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:84: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:82: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:79: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:80: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:118: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:120: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:121: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:119: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:116: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:117: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:155: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:157: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:158: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:156: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:153: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:154: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:192: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:194: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:195: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2014-10-22 17:13:53 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:79: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:83: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:25: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:29: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:33: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabText'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:37: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:41: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:65: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:69: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Subtitle'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:45: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:49: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:53: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:57: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title.Inverse'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:61: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:178: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar.Horizontal'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:182: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:113: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
[2014-10-22 17:13:57 - MyFirstApp] C:\Users\Cliff\workspace\appcompat_v7\res\values-v21\styles_base.xml:115: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
.
.
.
.

8 个答案:

答案 0 :(得分:23)

  

为了您的信息,我的目标SDK是API19,我也在使用API​​19

进行编译

将API21(或更高版本)用于目标并进行编译。

API 19不知道缺少的材料。

要使用Eclipse执行此操作,请将您自己的项目设置为目标API21(或更高版本):打开项目属性,然后在 Android 窗格中指定 Project Build Tagret 为API21(或更高版本)。当您自己项目的 Project Build Tagret 低于21时,会出现问题中的错误。修改其 Project Build Tagret 时,清理并重新构建您自己的项目。

答案 1 :(得分:13)

我找到问题的根源,当我们创建一个新项目时,它包含appcompat_v7库的引用:

enter image description here

appcompat_v7库已包含支持库“android-support-v4.jar

enter image description here

问题是创建的新项目包含在/libs文件夹中,库“android-support-v4.jar”也是,只需从新项目中删除此.jar(已包含在appcompat_v7中{1}}图书馆)

不要忘记clean and build your project

使用API​​ 19使用API​​ 21或更高版本

会发生此问题

答案 2 :(得分:6)

这是因为" appcompact_v7" 库项目的Eclipse和SDK关系。

当我们创建一个新的 Android应用程序项目时,eclipse尝试为它添加一个库(appcompact_v7)项目。如果我们使用目标19(API 19)创建项目,eclipse还将使用 API 19 生成 appcompact_v7 库项目。当我们清理并构建应用程序时,我们得到如下错误:

....\appcompat_v7\res\values-v21\styles_base.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
....\appcompat_v7\res\values-v21\styles_base.xml:79: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'.
....\appcompat_v7\res\values-v21\styles_base.xml:83: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
....\appcompat_v7\res\values-v21\styles_base.xml:25: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'.
....\appcompat_v7\res\values-v21\styles_base.xml:29: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'.
  

为什么呢?因为当eclipse创建appcompact_v7时,它会从SDK管理器中检索每个SDK版本的所有引用。因此,在 appcompact_v7 中,SDK的引用将大于API 19.

好的,请在日志中查看此部分:appcompat_v7\res\values-v21\styles_base.xml:75。如图所示,它无法编译values-v21的引用(表示目标21(API 21))。因此,它显示出错误。

那么,我们需要做些什么。我们需要做的是, appcompact_v7项目的编译目标始终必须是相关SDK的最新API

我也发现了这个错误,因为我的最新版本是 API 23 ,我用 API 22 编译它。所以,我收到了这个错误:

....\appcompat_v7\res\values-v23\styles_base.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
....\appcompat_v7\res\values-v23\styles_base_text.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

所以,我将appcompact_v7的project.properties中的android目标更改为最新版本,如下所示:

enter image description here

同样在项目的project.properties中如下:

enter image description here

之后,我清理并编译项目。它没有显示错误。

答案 3 :(得分:4)

你会在值-v21看到错误,据说你还没有安装Android API21。 如果您安装Android API21,错误将自动消失。

答案 4 :(得分:3)

  1. 更新 appcompat v7 的project.properties文件,其中包含:target=android-19target=android-21

  2. 同时更新google play services

答案 5 :(得分:1)

您可以尝试的另一个问题是打开android-support-v7-appcompat的project.properties文件并更改目标target = android-21(最新)。 然后做一个项目 - >清理......以便更改生效。

答案 6 :(得分:0)

看看这是否有帮助:

  1. 在Eclipse中,右键单击当前项目,单击Import ...然后选择General>现有项目进入工作区。
  2. 使用"选择根目录:"并浏览包含" adt-bundle-windows"的本地文件夹;在pathname中,它通常看起来像" C:\ Development \ adt-bundle-windows-x86_64-20140702 \ sdk \ extras \ android \ support \ v7 \ appcompat"。选择该appcompat文件夹。
  3. 在Projects:下,应检查android-support-v7-appcompat。重要提示:确保"将项目复制到工作区"也经过检查。
  4. 点击完成。
  5. android-support-v7-appcompat项目将出现在Package Explorer下。转到文件>新> Android应用程序项目,创建一个新项目,您将看到每次创建新项目时都会构建appcompat_v7。
  6. android-support-v7-appcompat项目现在可以删除。执行此操作后,它将停止为当前项目工作,并将显示错误。接下来做......
  7. 右键单击当前项目,转到“属性”。
  8. 单击Android,然后在Library下单击Add ...并选择appcompat_v7以与当前项目关联。从列表中删除android-support-v7-appcompat。现在,appcompat_v7将在您的工作区中显示为自己的项目(并且它可能会修复bin文件夹),并且您当前的项目现在应该可以正常工作。

答案 7 :(得分:0)

就我而言,我通过以下四个步骤来解决这个问题:

  

1)右键单击 appcompat_v7

     

2)转到属性

     

3)选择android

     

4)设定目标高于19 api然后申请并确定

最后,删除此错误。