【问题标题】:Error .xml "error: Error parsing XML: unbound prefix"错误 .xml “错误:解析 XML 时出错:未绑定前缀”
【发布时间】:2016-06-24 13:01:50
【问题描述】:

我正在尝试制作淡入淡出动画,但它给了我这个错误:

error: Error parsing XML: unbound prefix

这是代码:

<?xml version="1.0" encoding="utf-8"?>
<set>
<alpha android:fromAlpha="0.0"
       android:toAlpha="1.0"
       android:interpolator="@android:anim/accelerate_interpolator"
       android:duration="3000">
</alpha>
</set>

【问题讨论】:

    标签: android xml animation fadein alpha


    【解决方案1】:

    在您的情况下,未绑定的前缀是 android。添加

    xmlns:android="http://schemas.android.com/apk/res/android"
    

    到你的集合。例如

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

    xmln 是namespace

    【讨论】:

      【解决方案2】:

      第一个节点(set)需要包含

      xmlns:android="http://schemas.android.com/apk/res/android"

      【讨论】:

        猜你喜欢
        • 2015-05-09
        • 1970-01-01
        • 2012-08-07
        • 1970-01-01
        • 1970-01-01
        • 2012-12-22
        • 2015-01-27
        • 1970-01-01
        • 2014-02-24
        相关资源
        最近更新 更多