Error: No resource found that matches the given name: attr 'colorAccent' in Eclipse
Error: No resource found that matches the given name: attr 'colorAccent' in Eclipse
我是 android 开发的业余爱好者,我一直在从事一个关于 eclipse 的项目。我已经在 21 日完成了我的 android:minSdkVersion="21" 和 android:targetSdkVersion="22" 以及 API 上的项目构建目标。以下是我的 style.xml[= 中的错误11=]
[2016-03-05 15:55:13 - Iot] C:\workspace\Iot\res\values\style1.xml:12: 错误:错误:找不到与给定名称匹配的资源:attr 'colorAccent'.
[2016-03-05 15:55:13 - Iot] [2016-03-05 15:55:13 - Iot] C:\workspace\Iot\res\values\style1.xml:10: 错误: 错误:找不到与给定名称匹配的资源:attr 'colorPrimary'.
[2016-03-05 15:55:13 - Iot] [2016-03-05 15:55:13 - Iot] C:\workspace\Iot\res\values\style1.xml:11: 错误:错误:找不到与给定名称匹配的资源:attr 'colorPrimaryDark'。
[2016-03-05 15:55:13 - Iot] [2016-03-05 15:55:13 - Iot] C:\workspace\Iot\res\values\style1.xml:8: 错误: 错误:找不到与给定名称匹配的资源:attr 'windowNoTitle'.
这是style.xml
的xml代码
<resources>
<style name="MyMaterialTheme" parent="MyMaterialTheme.Base">
</style>
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
我对要做什么感到有点困惑,如果有人能帮助我解决这个问题,我会很高兴。提前致谢。
将这些属性用作:
<resources>
<style name="MyMaterialTheme" parent="MyMaterialTheme.Base" />
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:colorPrimary">@color/colorPrimary</item>
<item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:colorAccent">@color/colorAccent</item>
</style>
</resources>
我是 android 开发的业余爱好者,我一直在从事一个关于 eclipse 的项目。我已经在 21 日完成了我的 android:minSdkVersion="21" 和 android:targetSdkVersion="22" 以及 API 上的项目构建目标。以下是我的 style.xml[= 中的错误11=]
[2016-03-05 15:55:13 - Iot] C:\workspace\Iot\res\values\style1.xml:12: 错误:错误:找不到与给定名称匹配的资源:attr 'colorAccent'.
[2016-03-05 15:55:13 - Iot] [2016-03-05 15:55:13 - Iot] C:\workspace\Iot\res\values\style1.xml:10: 错误: 错误:找不到与给定名称匹配的资源:attr 'colorPrimary'.
[2016-03-05 15:55:13 - Iot] [2016-03-05 15:55:13 - Iot] C:\workspace\Iot\res\values\style1.xml:11: 错误:错误:找不到与给定名称匹配的资源:attr 'colorPrimaryDark'。
[2016-03-05 15:55:13 - Iot] [2016-03-05 15:55:13 - Iot] C:\workspace\Iot\res\values\style1.xml:8: 错误: 错误:找不到与给定名称匹配的资源:attr 'windowNoTitle'.
这是style.xml
的xml代码<resources>
<style name="MyMaterialTheme" parent="MyMaterialTheme.Base">
</style>
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
我对要做什么感到有点困惑,如果有人能帮助我解决这个问题,我会很高兴。提前致谢。
将这些属性用作:
<resources>
<style name="MyMaterialTheme" parent="MyMaterialTheme.Base" />
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:colorPrimary">@color/colorPrimary</item>
<item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:colorAccent">@color/colorAccent</item>
</style>
</resources>