我是android编程的新手。我使用Eclipse和版本:Mars.1 Release(4.5.1)
我创建了我的第一个Android应用项目,其规格如下:
所需的最低SDK:API 8:Android 2.2(Froyo)
目标SDK:API 20:Android 4.4(KitKat Wear)
编译:Google API(Google Inc.)(API 17)
但是在项目创建之后,我在控制台中看到了很多例外。我在互联网上搜索了很多例外,但没有在网上工作。
错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.ActionButton”匹配的资源。
错误:检索项目的父项时出错:找不到与给定名称“android:Widget.Material.ActionButton”匹配的资源。
控制台中的例外是:
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:71: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
>
> D:\Android\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.CloseMode'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:80: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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.ActionMode.Title'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:94: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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.ActionMode.Title'.
>
> D:\Android\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.Subtitle'.
>
> D:\Android\workspace\appcompat_v7\res\values-v23\styles_base_text.xml:22: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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.Widget.Button'.
>
> D:\Android\workspace\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:37: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:156: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:160: error: Error: No resource found that matches the given name: attr 'android:colorButtonNormal'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:158: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:159: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:157: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:154: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:155: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:89: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:93: error: Error: No resource found that matches the given name: attr 'android:colorButtonNormal'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:91: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:92: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:90: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:87: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:88: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:134: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:138: error: Error: No resource found that matches the given name: attr 'android:colorButtonNormal'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:136: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:137: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:135: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:132: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:133: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:142: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\themes_base.xml:146: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:71: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
>
> D:\Android\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.CloseMode'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:80: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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'.
>
> D:\Android\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.ActionMode.Title'.
>
> D:\Android\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.Subtitle'.
>
> D:\Android\workspace\appcompat_v7\res\values-v23\styles_base_text.xml:22: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'.
>
> D:\Android\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.Title'.
>
> D:\Android\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.Subtitle'.
>
> D:\Android\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.Title.Inverse'.
>
> D:\Android\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.Subtitle.Inverse'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:195: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar.Horizontal'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:199: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar'.
>
> D:\Android\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.Spinner'.
>
> D:\Android\workspace\appcompat_v7\res\values-ldltr-v21\styles_base.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner.Underlined'.
>
> D:\Android\workspace\appcompat_v7\res\values-v23\styles_base.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner.Underlined'.
>
> D:\Android\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.DropDownItem.Spinner'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:114: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:104: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView.DropDown'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:119: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListPopupWindow'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:131: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:136: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:122: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.PopupMenu'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:125: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.PopupMenu'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:139: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:143: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:147: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:151: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:157: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.SearchResult.Title'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:161: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.SearchResult.Subtitle'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:165: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:90: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Toolbar.Button.Navigation'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:94: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
>
> D:\Android\workspace\appcompat_v7\res\values-v21\styles_base.xml:98: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
此致
的Habib
答案 0 :(得分:0)
使用api级别编译必须是> =目标api级别
所需的最低SDK:API 8:Android 2.2(Froyo)
目标SDK:API 20:Android 4.4(KitKat Wear)必须至少与API级别相同
编译:Google API(Google Inc.)(API 17)这不能低于目标SDK API级别
答案 1 :(得分:0)
您必须将Target SDK设置为API 21