私はのstyles.xmlにこのエラーを取得しています:アイテムの親を取得エラー:リソースは、指定された名前と一致し見つからない「アンドロイド:Theme.Material.Light」
エラー:いいえリソースを指定された名前 'android:Theme.Material.Light'に一致する に一致しました。マニフェストで
:
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="21" />
のAndroid SDKマネージャー:私はすべてのAPI 21とエキストラを更新しています
。
ためにエクスポート:
値-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あなたと私を助けることができますなぜ私は知りませんでした。
targetSdkVersionは21より低くなりますが、compileSdkVersionは21より大きい必要があります – maxb3k