Activity idle timeout for HistoryRecord?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-17 09:33:35

问题


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.


回答1:


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.

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.




回答2:


I had a similar problem.
Inside my View.dispatchDraw(), I was calling a method that triggered another dispatchDraw().
(Adding a logline inside my dispatchDraw() showed that the function was called continuously. This did not show up when doing method profiling in Eclipse)

Hope this is helpful to someone.



来源:https://stackoverflow.com/questions/4283449/activity-idle-timeout-for-historyrecord

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!