2015-01-07 12 views
9

sto ottenendo questo errore in styles.xml:Errore nel recupero genitore per la voce: No risorsa trovato che corrisponde al nome dato 'Android: Theme.Material.Light'

Errore nel recupero genitore per la voce: No risorsa trovato che corrisponde al nome dato 'android: Theme.Material.Light'.

In manifestare:

<uses-sdk 
    android:minSdkVersion="16" 
    android:targetSdkVersion="21" /> 

Android Sdk Responsabile:

sto aggiornato tutte le api 21 e comparse.

enter image description here

enter image description here

in ordine e di esportazione:

enter image description here

valori-V21/styles.xml:

<?xml version="1.0" encoding="utf-8"?> 
<resources> 
    <style name="AppTheme" parent="android:Theme.Material.Light"> 

     <item name="android:colorPrimary">@color/primary</item> 
     <item name="android:colorPrimaryDark">@color/primary_dark</item> 
     <item name="android:colorAccent">@color/accent</item> 
     <item name="android:textColorPrimary">@color/text_primary</item> 
     <item name="android:textColor">@color/text_secondary</item> 
     <item name="android:navigationBarColor">@color/primary_dark</item> 

    </style> 
</resources> 

Console:

E:\workspace\WelcomeToL\app\src\main\res\values-v21\styles.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'. 

E:\workspace\WelcomeToL\app\src\main\res\values-v21\styles.xml:7: error: Error: No resource found that matches the given name: attr 'android:colorAccent'. 

E:\workspace\WelcomeToL\app\src\main\res\values-v21\styles.xml:5: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. 

E:\workspace\WelcomeToL\app\src\main\res\values-v21\styles.xml:6: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. 

E:\workspace\WelcomeToL\app\src\main\res\values-v21\styles.xml:10: error: Error: No resource found that matches the given name: attr 'android:navigationBarColor'. 

non sapeva perché questo errore ancora occurs.Anybody mi può aiutare con this.Thank voi.

risposta

9

Errore nel recupero del genitore per l'articolo: Nessuna risorsa trovata che corrisponde al nome dato "android: Theme.Material.Light".

Material.Light tema richiede livello API 21 per il progetto. Imposta Obiettivo creazione progetto per il progetto da Properties->Android->Project Build Target a API 21.

+1

targetSdkVersion potrebbe essere inferiore a 21, ma compileSdkVersion deve essere> = 21 – maxb3k

Problemi correlati