java.lang.ClassCastException: android.content.res.XmlBlock$Parser cannot be cast to android.view.ani

来源:互联网 发布:双色球公式计算法2016 编辑:程序博客网 时间:2024/05/21 06:29

今天做项目做动画报错了

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.aj.srs/com.aj.frame.app.regist.Reg_EntryCar}: java.lang.ClassCastException: android.content.res.XmlBlock$Parser cannot be cast to android.view.animation.Animation

稀奇古怪这还有错啊艹.代码是这样写的。。.Animation a=(Animation)getResources().getAnimation(R.anim.launch_fade_in_fast);

晕死最后发现需要这样些Animation hyperspaceJumpAnimation =AnimationUtils.loadAnimation(this, R.anim.regc_keyboard);

 

可能是思维定时,真不知道谷歌为什么那样写不行。

3 0
原创粉丝点击