颜色 xml:“属性缺少 Android 命名空间前缀"; [英] colors xml: "Attribute is missing the Android namespace prefix"

查看:36
本文介绍了颜色 xml:“属性缺少 Android 命名空间前缀";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的colors.xml:

This is my colors.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="white">#ffffff</color>
</resources>

这给了我以下错误:属性缺少 Android 命名空间前缀我可以更改什么来消除此错误?

This gives me the following error: Attribute is missing the Android namespace prefix What can I change to make this error go away?

推荐答案

尝试添加这个...

<resources xmlns:android="http://schemas.android.com/apk/res/android">
<color name="white">#FFFFFF</color>
</resources>

这篇关于颜色 xml:“属性缺少 Android 命名空间前缀";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆