2015-01-07 6 views
9

मैं styles.xml में इस त्रुटि हो रही है:आइटम के लिए माता-पिता प्राप्त करते समय त्रुटि: नहीं संसाधन में पाया गया कि दिए गए नाम से मेल खाता 'एंड्रॉयड: Theme.Material.Light'

आइटम के लिए माता-पिता प्राप्त करते समय त्रुटि: नहीं संसाधन पाया गया है कि दिए गए नाम 'एंड्रॉइड: थीम.मटेरियल। लाइट' से मेल खाता है।

प्रकट में:

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

Android SDK प्रबंधक:

मैं अद्यतन कर रहा हूँ सभी एपीआई 21 और एक्स्ट्रा कलाकार।

enter image description here

enter image description here

आदेश में और निर्यात:

enter image description here

मान-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> 

कंसोल:

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'. 

मैं नहीं जानता था कि क्यों इस त्रुटि अभी भी occurs.Anybody this.Thank आप के साथ मेरी मदद कर सकते हैं।

उत्तर

9

आइटम के लिए माता-पिता प्राप्त करते समय त्रुटि: नहीं संसाधन में पाया गया कि दिया गया नाम 'एंड्रॉयड: Theme.Material.Light' मेल खाता है।

Material.Light विषय परियोजना के लिए एपीआई स्तर 21 की आवश्यकता है। परियोजना Properties->Android->Project Build Target से API 21 पर परियोजना के लिए लक्ष्य सेट करें।

+1

targetSdkVersion 21 से कम हो सकता है, लेकिन compileSdkVersion होना चाहिए> = 21 – maxb3k

संबंधित मुद्दे

 संबंधित मुद्दे