Error处理:关于XML文件解析报错:android XML : unbound prefix

编写XML文件的时候,经常回出现android XML : unbound prefix这个错误

例如:

<?xml version="1.0" encoding="utf-8"?>
<set>
    <rotate xmlns:Android="http://schemas.android.com/apk/res/android"
        Android:fromdegrees="0"
        android:pivotX="50%"
        android:duration="0"
        android:interpolator="@android:anim/linear_interpolator"
        android:pivotY="50%"
        android:repeatCount="0"
        android:todegrees="-90" />
</set>

一不小心它就会跳出来。
这个里面错误的原因是把android写成了Android,Android开发中大小写是敏感的。

错误:android XML : unbound prefix

出现该错误一般有两个原因:

1.拼写错误。例如把android写成了amdroid,Android等

2.xml文档内没有加入 xmlns:android="http://schemas.android.com/apk/res/android" 引用。

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念