首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到与给定名称匹配的资源: attr 'colorPrimary‘Theme.AppCompat.Light

找不到与给定名称匹配的资源: attr 'colorPrimary‘Theme.AppCompat.Light
EN

Stack Overflow用户
提问于 2015-10-26 10:19:12
回答 1查看 97关注 0票数 0

我正在以Theme.AppCompat.Light为主题在我的styles.xml文件中使用colorPrimary。我遇到一个没有找到与给定名称匹配的资源: attr 'colorPrimary‘。我使用了this question作为参考,但它与我所寻找的不匹配。以下是我的源代码:

代码语言:javascript
复制
<resources xmlns:android="http://schemas.android.com/apk/res/android">

    <!--
        Base application theme, dependent on API level. This theme is replaced
        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
    -->
    <style name="AppBaseTheme" parent="Theme.AppCompat.Light">
        <!--
            Theme customizations available in newer API levels can go in
            res/values-vXX/styles.xml, while customizations related to
            backward-compatibility can go here.
        -->
        <item name="colorPrimary">#690</item>
    </style>

    <style name="FlipPremiumOpenScreenTheme" parent="Theme.AppCompat.Light">
        <!--
            Theme customizations available in newer API levels can go in
            res/values-vXX/styles.xml, while customizations related to
            backward-compatibility can go here.
        -->
        <item name="android:windowNoTitle">true</item>
    </style>

    <!-- Application theme. -->
    <style name="AppTheme" parent="AppBaseTheme">
        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
    </style>

    <!-- Application theme. -->

</resources>

有没有什么我没注意到的?

EN

回答 1

Stack Overflow用户

发布于 2016-03-05 19:05:54

将您的代码更改为:

代码语言:javascript
复制
<item name="android:colorPrimary">#690</item>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33337507

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档