NoClassDefFoundError:android.app.ANRManagerProxy [英] NoClassDefFoundError: android.app.ANRManagerProxy

查看:1025
本文介绍了NoClassDefFoundError:android.app.ANRManagerProxy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道为什么会发生这种情况吗?我看到这个崩溃由我的应用程序报告,但我不知道是什么。

Does anyone know why this happens? I see this crash reported by my app but I have no idea what it is.

java.lang.NoClassDefFoundError: android.app.ANRManagerProxy

Thread: Binder_3, Exception: java.lang.NoClassDefFoundError: android.app.ANRManagerProxy 
at android.app.ANRManagerNative.asInterface(ANRManagerNative.java:30) 
at android.app.ANRManagerNative$1.create(ANRManagerNative.java:94) 
at android.app.ANRManagerNative$1.create(ANRManagerNative.java:88)
at android.util.Singleton.get(Singleton.java:34) at android.app.ANRManagerNative.getDefault(ANRManagerNative.java:37) 
at android.os.MessageLogger.dump(MessageLogger.java:253) 
at android.app.ANRAppManager.dumpMessageHistory(SourceFile:38) 
at android.app.ActivityThread$ApplicationThread.dumpMessageHistory(ActivityThread.java:1176) 
at android.app.ApplicationThreadNative.onTransact(ApplicationThreadNative.java:609) 
at android.os.Binder.execTransact(Binder.java:351) 
at dalvik.system.NativeStart.run(Native Method)


推荐答案

这个错误可以在一小组设备上看到(我没有列表,但他们往往是没有名字的品牌)由于未知的原因,它的固件开发者从设备框架中删除了 ANRManagerProxy (我通过搜索固件并自己反编译它来确认这一点)。

This error can be seen on a small group of devices (I don't have a list, but they tend to be no-name brands) whose firmware developers, for unknown reasons, removed the ANRManagerProxy from the device framework (I confirmed this by hunting down a firmware and decompiling it myself).

你最好做的是尝试搜索任何可能的代码,可能会锁定线程并导致设备变得无响应,并尝试使用 AsyncTask 或类似的,以异步方式运行代码,避免ANR。有问题的设备总是低端,因此您的代码需要更长时间才能运行,并且有更大的机会导致此情况发生。

The best you can do is try to hunt down any possible code which could be locking up the thread and causing the device to become nonresponsive, and try to use an AsyncTask or similar to run the code asynchronously and avoid the ANR. The devices in question are always low end, and so your code will take longer to run and have a greater chance of causing this to happen.

我建议 Hugo 作为一个伟大的库来调试方法执行时间,以缩小您的注意力在哪里花费最多的时间。这将有助于改善所有用户的代码,并降低相关崩溃的风险。

I'd suggest Hugo as a great library for debugging method execution times, in order to narrow your focus on where the most time is being spent. This will help improve your code for all users, as well as reducing the risk of the crash in question.

这篇关于NoClassDefFoundError:android.app.ANRManagerProxy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆