Error inflating animation resource
I read this example and I'm trying to use it. I put this in drawable folder as 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>
I also put it in anim folder I try to add header like:
<?xml version="1.0" encoding="utf-8"?>
But give me an error like this:
Er开发者_开发知识库ror in an XML file: aborting build.
What is wrong?
Strange, it seems that android:id
is not a valid attribute for frame animations.
Try removing that attribute and/or adding xmlns:android="http://schemas.android.com/apk/res/android"
to <animation-list>
.
had you inserted required drawable? or you can clean and build the project
Eclipse>Project>clean
精彩评论