开发者

unbound prefix error on animation list

I get a unbounded prefix error from this xml file named rm_anim.xml. It is for a background resource for using an AnimationDrawable.

<?xml version="1.0" encoding="utf-8"?>
    <resources>
        <animation-list android:id="ram_anim" android:oneshot="false"&g开发者_Go百科t;
            <item android:drawable="@drawable/krnl1" android:duration="150" />
            <item android:drawable="@drawable/krnl2" android:duration="150" />
            <item android:drawable="@drawable/krnl3" android:duration="150" />
        </animation-list>
    </resources>

This is following the tutorial on AnimationDrawable. Any ideas?


Shouldn't android:id define that the value is an ID??

Use the @+id to define a new id, instead of referencing another one

i.e

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <animation-list android:id="@+id/ram_anim" android:oneshot="false">
        <item android:drawable="@drawable/krnl1" android:duration="150" />
        <item android:drawable="@drawable/krnl2" android:duration="150" />
        <item android:drawable="@drawable/krnl3" android:duration="150" />
    </animation-list>
</resources>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜