2014-10-29 121 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一起失敗,上面發佈的錯誤完全相同。

相關問題