开发者

Error inflating animation resource

开发者 https://www.devze.com 2023-04-06 18:50 出处:网络
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\">

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 
0

精彩评论

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

关注公众号