Android XML 位图给出错误"Invalid Start tag bitmap"错误



我想使用一个指向位图文件的xml位图文件

我得到一个错误"无效的开始标记位图"。文件放在res/drawable文件夹中。

<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
 android:src="@drawable/back"
 android:tileMode="repeat" />

请帮助

尝试用item:包装它

<?xml version="1.0" encoding="utf-8"?>
<item xmlns:android="http://schemas.android.com/apk/res/android">
    <bitmap 
        android:src="@drawable/back"
        android:tileMode="repeat" />
</item>

拖动鼠标时,文件被错误地移动到其他文件夹。这导致了所有的问题。非常感谢大家。

我认为在创建.xml文件时,您使用了"Android xml Value file"。请使用"Android XML文件",然后在下一页中选择位图。

相关内容

最新更新