Android 未找到与给定名称匹配的资源:attr';彩色初级';Theme.AppCompat.Light
我正在使用styles.xml文件中的Android 未找到与给定名称匹配的资源:attr';彩色初级';Theme.AppCompat.Light,android,Android,我正在使用styles.xml文件中的colorPrimary,主题为Theme.AppCompat.Light。我遇到一个找不到与给定名称匹配的资源:attr'colorPrimary'。我用它作为参考,但它不符合我要找的。以下是我的源代码: <resources xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Base application theme, depen
colorPrimary
,主题为Theme.AppCompat.Light
。我遇到一个找不到与给定名称匹配的资源:attr'colorPrimary'。我用它作为参考,但它不符合我要找的。以下是我的源代码:
<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>
#690
真的
有什么我忽略的吗?将代码更改为:
<item name="android:colorPrimary">#690</item>
#690
您使用的是哪个版本的支持库?我使用的是最新版本23.1。也许您可以创建一个支持库并将其上传到某个地方?35; FFF000sumit,有一个问题。我现在收到一条错误消息,它需要API级别21(当前最小值为8)。