活动空闲超时时间为HistoryRecord?时间为、HistoryRecord

2023-09-12 03:14:46 作者:桔梗

W/ActivityManager(   81): Launch timeout has expired, giving up wake lock!
W/ActivityManager(   81): Activity idle timeout for HistoryRecord

有谁知道什么原因会造成这种情况? 谢谢你。

Does anyone know what reason would cause this happens? Thanks.

推荐答案

这意味着,活动无法显示,因为它仍然在试图完成执行;与此同时,ActivityManager已超时。

It means that the Activity cannot be displayed because it is still trying to complete execution; meanwhile the ActivityManager has timed out.

我有同样的问题,和管理活动对象之间整理相关性来解决这个问题。

I had the same problem, and managed to resolve it by tidying up dependencies between Activity objects.

我会建议启动调试。看任何服务,您的活动依赖于(如HTTP客户端,解析器等),并检查它没有阻止。如果你有服务被活动对象之间共享,也可能是值得一试,他们仍然存在于内存中的GC可能破坏缓存为WeakReference的对象的任何静态引用服务对象或对象。

I would recommend starting up the debugger. Look at any 'services' that your Activity depends on (e.g. http client, parsers etc.) and check that it is not blocking. If you have 'services' that are shared between Activity objects, it might also be worth checking that they still exist in memory as GC may have destroyed any statically referenced service objects or objects cached as WeakReference objects.