[英]Resources$NotFoundException when trying to load animation
Our app on Google Play market has a weird exception being thrown on some devices. 我们在Google Play市场上的应用程序在某些设备上引发了一个奇怪的例外。 I see the following stack trace:
我看到以下堆栈跟踪:
android.content.res.Resources$NotFoundException: File res/anim/ani_in_fade.xml from xml type anim resource ID #0x7f040000
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2185)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2140)
at android.content.res.Resources.getAnimation(Resources.java:894)
at android.view.animation.AnimationUtils.loadAnimation(AnimationUtils.java:71)
....
Basically, all the animations are in place in the res/anim folder. 基本上,所有动画都在res / anim文件夹中。 Most of the devices load and display them without a problem.
大多数设备加载并显示它们没有问题。
Any ideas what may be the reason for this? 任何想法可能是什么原因? One of the ideas I have is that activity is being (or has been) destroyed at the point we try to load the resource, however the context is not null at that point of time...
我的一个想法是,在我们尝试加载资源时,活动正在(或已经)被破坏,但是在那个时间点上下文不是空的...
Thanks, 谢谢,
Just in case anyone hits this problem... You need to update your proguard.cfg file and add the following lines: 以防任何人遇到此问题...您需要更新您的proguard.cfg文件并添加以下行:
-keepclassmembers class **.R$* {
public static <fields>;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.