在xml文件中出现“错误:解析XML:解除绑定前缀错误”

时间:2011-12-31 18:30:20

标签: xml parsing prefix

我了解其他人已经问过此问题,但我已按照他们的说明操作,但仍然收到相同的错误消息。这是补间动画的xml文件:

<?xml version="1.0" encoding="utf-8"?>
<set>
xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<alpha
    android:fromAlpha="0.0"
    android:toAlpha="1.0"
    android:duration="2500">        
</alpha>

</set>

任何帮助都会很棒。提前谢谢。

摩西

2 个答案:

答案 0 :(得分:3)

标签上有问题。您已关闭<Set>代码而未包含xmlns:部分代码

<set**>**
xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">

答案 1 :(得分:1)

您的XML在语法上无效。也许你的意思是这样的?

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:shareInterpolator="false">
<alpha
    android:fromAlpha="0.0"
    android:toAlpha="1.0"
    android:duration="2500">        
</alpha>

</set>