简体   繁体   English

检索项目的父项时出错:找不到与给定名称“android:Theme.Material.Light”匹配的资源

[英]Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'

I am getting this error in styles.xml: 我在styles.xml中收到此错误:

Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'. 检索项目的父项时出错:找不到与给定名称“android:Theme.Material.Light”匹配的资源。

In manifest: 在清单中:

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

Android Sdk Manager: Android Sdk经理:

I am updated all the api 21 and extras. 我更新了所有的api 21和额外内容。

在此输入图像描述

在此输入图像描述

In Order and Export : 在订单和出口

在此输入图像描述

values-v21/styles.xml: 值-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'.

I didn't know why this error still occurs.Anybody can help me with this.Thank you. 我不知道为什么这个错误仍然存​​在。任何人都可以帮助我。谢谢。

Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'. 检索项目的父项时出错:找不到与给定名称“android:Theme.Material.Light”匹配的资源。

Material.Light theme require API level 21 for project. Material.Light主题需要API级别21才能用于项目。 Set Project Build Target for project from Properties->Android->Project Build Target to API 21 . 项目的项目构建目标Properties->Android->Project Build TargetAPI 21

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:检索项目父项时出错:找不到与给定名称&#39;android:Theme.DeviceDefault.Light&#39;相匹配的资源 - error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.DeviceDefault.Light' 键入错误:检索项目的父项时出错:未找到与给定名称&#39;android:Theme.Holo.Light&#39;相匹配的资源。 - Type error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'. 错误:检索父项时出错:找不到与给定名称&#39;android:Theme.Holo.Light.DarkActionBar&#39;匹配的资源 - error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar' 检索项目的父项时出错:找不到与给定名称匹配的资源&#39;@android:style / Theme.AppCompat.Light.DarkActionBar&#39; - Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.AppCompat.Light.DarkActionBar' Android studio错误检索项目的父项:找不到与给定名称“Theme.AppCompat.Light.DarkActionBar”匹配的资源 - Android studio Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar' 检索父项时出错:找不到与给定名称“ Android:Theme.Material”匹配的资源 - Error retrieving parent for item: No resource found that matches the given name 'Android:Theme.Material' 寻求帮助:“错误:检索项目父项时出错:找不到与给定名称&#39;Theme.AppCompat.Light&#39;相匹配的资源” - Asking for help: “error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light' ” 错误:检索项目的父项时出错:找不到与给定名称“ Theme.AppCompat.Light.NoActionBar”匹配的资源 - error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar' Eclipse错误创建android应用程序:检索项的父项时出错:找不到与给定名称&#39;Theme.AppCompat.Light.DarkActionBar&#39;匹配的资源 - Eclipse error create android app:Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar' 键入错误:检索项目的父项时出错:未找到与给定名称&#39;Theme.AppCompat.Light&#39;匹配的资源。 styles.xml Android AAPT - Type error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. styles.xml Android AAPT
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM