2014-11-02 85 views
7

我正在使用Eclipse,我將appcompat lib添加到了我的項目中,並突然沒有生成R.java文件。 但是在我的控制檯中,每當我清理項目時,它都會顯示這樣的狀態。由於appcompat v7,R.java沒有生成?

[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\res\values-v21\styles_base.xml:138: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'. 
[2014-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\res\values-v21\styles_base.xml:143: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'. 
[2014-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\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-11-02 18:50:16 - Client] 
[2014-11-02 18:50:16 - Client] G:\ProgramZ\workspace\android-support-v7-appcompat\res\values-v21\themes_base.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material'. 

這是我的文件結構

我試圖遷移該項目到Android工作室。由於此錯誤,Gradle文件也不會生成。所以,請推薦給克服這個的好辦法... 由於提前

+1

好像你沒有在'appcompat-v7' project.properties中正確設置'target'。閱讀更多關於它在這[StackO-Post](http://stackoverflow.com/questions/26431676/appcompat-v721-0-0-no-resource-found-that-matches-the-given-name-attr- andro/26449172#26449172) – reVerse 2014-11-02 15:52:48

+0

@reVerse我已經看到那篇文章&試過了一切。 – AruLNadhaN 2014-11-02 16:08:53

+0

你可以檢查1)你的appcompat項目是一個庫項目2)它沒有錯誤,即appcompat/bin包含預期的jar文件 – kiruwka 2014-11-02 19:13:34

回答

5

更改程序兼容性構建目標至Android 5.0

那麼你的項目太..然後重建它

+0

你這個華麗的混蛋,那個工作很漂亮。 – twig 2014-12-22 01:57:16

0

我明白你的問題,如果你做了任何更新並刪除了以前的SDK構建工具,那麼原因是針對錯誤的Android版本。 如果你改變目標,它將運行或重新安裝這些已刪除的SDK Build工具,它也將解決問題。 這是我第一次啓動android時得到的問題。 :)所有最佳

0

我有同樣的問題。在更新到最新的SDK工具,SDK平臺工具SDK構建工具所有事情再次編譯。確保你已安裝最新版本。

enter image description here

0

嘿朋友仔細閱讀錯誤日誌V21這意味着,如果你不更新的SDK,請更新您的SDK和設定的目標是Android 5.0,不要擔心你的應用程序將運行在下降版21版有一些問題直到min sdk你提供你只需要根據錯誤日誌更改目標sdk。

謝謝