我读了this example,我正在尝试使用它。我将它放在可绘制的文件夹中somth.xml
:
<animation-list android:id="selected" android:oneshot="false">
<item android:drawable="@drawable/img1" android:duration="50" />
<item android:drawable="@drawable/img2" android:duration="50" />
</animation-list>
我也把它放在anim文件夹中我尝试添加标题:
<?xml version="1.0" encoding="utf-8"?>
但是给我一个这样的错误:
XML文件中的错误:中止构建。
有什么问题?
答案 0 :(得分:0)
奇怪的是,似乎android:id
是not a valid attribute for frame animations。
尝试删除该属性和/或将xmlns:android="http://schemas.android.com/apk/res/android"
添加到<animation-list>
。
答案 1 :(得分:0)
你插入了必需的drawable吗?或者你可以清理和建立项目
Eclipse>Project>clean