简体   繁体   中英

Android Support Library appcompat_v7 v21.0.1 gives error

Every thing worked fine before updating sdk and support libraries. After updating i just added the support library(mean imported the support library with resources). once i add it i get the following error

Error:

    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\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-11-12 13:28:16 - android-support-v7-appcompat] 
    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\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-12 13:28:16 - android-support-v7-appcompat] 
    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\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-12 13:28:16 - android-support-v7-appcompat] 
    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\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-12 13:28:16 - android-support-v7-appcompat] 
    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\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-12 13:28:16 - android-support-v7-appcompat] 
    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v17\styles_rtl.xml:20: error: Error: No resource found that matches the given name: attr 'android:layout_marginStart'.
    [2014-11-12 13:28:16 - android-support-v7-appcompat] 
    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v17\styles_rtl.xml:25: error: Error: No resource found that matches the given name: attr 'android:paddingEnd'.
    [2014-11-12 13:28:16 - android-support-v7-appcompat] 
    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v17\styles_rtl.xml:24: error: Error: No resource found that matches the given name: attr 'android:paddingStart'.       
    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\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'.
    [2014-11-12 13:28:16 - android-support-v7-appcompat] 
    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\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-11-12 13:28:16 - android-support-v7-appcompat] 
    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\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-11-12 13:28:16 - android-support-v7-appcompat] 
    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\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-11-12 13:28:16 - android-support-v7-appcompat] 
    [2014-11-12 13:28:16 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-v11\themes_base.xml:338: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.

After changing my Build Target to 21 from 17 i get these errors

[2014-11-12 13:33:15 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-large-v14\themes_base.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Base.AppCompat.DialogWhenLarge.Base'.
[2014-11-12 13:33:15 - android-support-v7-appcompat] 
[2014-11-12 13:33:15 - android-support-v7-appcompat] E:\Android Projects\android-support-v7-appcompat\res\values-large-v14\themes_base.xml:22: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Base.AppCompat.Light.DialogWhenLarge.Base'.
[2014-11-12 13:33:15 - android-support-v7-appcompat]

I tried a lot of things like importing the project again changing the project.properties file etc., I am not able to solve the issue

please help me out thanks in advance.

Modify the project.properties file, which has:

target=android-19

to

target=android-21

after changes above close project then open and clean

I'd like to comment but I'm too low on reputation. I run into the same issue once when changing my pc so I used to export the library from my old pc and imported that one into the new one afaik. You can give it a try but I can not guarantee that it works for you as well. You can use my exported library if you want to. Eventhough it doesn't make much sense, for some reason it worked for me after that. https://www.dropbox.com/s/ly9mhmlvthk15f9/Libraries.zip?dl=0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM