我是Android开发的新手。不知道这有什么问题。我已经宣布colors.xml值Res不能没有我的styles.xml使用的颜色...不能使用颜色值资源的风格值分辨率
这里就是我宣布colors.xml颜色:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="my_green">#59ab1b</color>
<color name="app_bgcolor">#ededed</color>
<color name="txt_grey">#707070</color>
</resources>
然后当我试图把它用在我的风格XML文件:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="lbl_welcome">
<item name="android:textSize">17sp</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/my_green"</item>
</style>
</resources>
它这样说:
error: Error: No resource found that matches the given name (at 'android:textColor' with value '@color/ my_green"').
什么想法?
以前感谢!
确保styles.xml是在Project >> res >> values >> style.xml – Samuel
我已经把styles.xml放在项目>> res> values – richardlin
是的,我肯定会接受答案帮助和工作.. :) – richardlin