02-11 02:58:50.949: ERROR/ActivityManager(365): ANR in com.android.launcher (com.android.launcher/com.android.launcher2.Launcher)
02-11 02:58:50.949: ERROR/ActivityManager(365): Reason: keyDispatchingTimedOut
02-11 02:58:50.949: ERROR/ActivityManager(365): Load: 2.57 / 1.18 / 0.89
02-11 02:58:50.949: ERROR/ActivityManager(365): cpu usage from 3042ms to -7585ms ago:
02-11 02:58:50.949: ERROR/ActivityManager(365): 74% 365/system_server: 53% user + 21% kernel / faults: 335 minor
02-11 02:58:50.949: ERROR/ActivityManager(365): 9% 780/zygote: 3.8% user + 5.1% kernel / faults: 915 minor
02-11 02:58:50.949: ERROR/ActivityManager(365): 8.2% 684/com.android.launcher: 6% user + 2.1% kernel / faults: 51 minor
02-11 02:58:50.949: ERROR/ActivityManager(365): 0% 432/zygote: 0% user + 0% kernel / faults: 22 minor
02-11 02:58:50.949: ERROR/ActivityManager(365): 2.4% 41/adbd: 0.3% user + 2% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 0.4% 546/com.android.systemUI: 0.1% user + 0.2% kernel / faults: 11 minor
02-11 02:58:50.949: ERROR/ActivityManager(365): 0.5% 733/logcat: 0% user + 0.5% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 0% 425/zygote: 0% user + 0% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 0% 28/servicemanager: 0% user + 0% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 100% TOTAL: 65% user + 34% kernel + 0.6% softirq
02-11 02:58:50.949: ERROR/ActivityManager(365): cpu usage from 9680ms to 11220ms later:
02-11 02:58:50.949: ERROR/ActivityManager(365): 70% 365/system_server: 28% user + 42% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 49% 396/InputDispatcher: 18% user + 30% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 21% 366/HeapWorker: 8.1% user + 13% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 26% 78014% user + 11% kernel / faults: 323 minor
02-11 02:58:50.949: ERROR/ActivityManager(365): 20% 780/.ap: 10% user + 10% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 5.4% 781/HeapWorker: 4.6% user + 0.7% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 1.3% 41/adbd: 0% user + 1.3% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 0.6% 41/adbd: 0% user + 0.6% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 0.6% 65/adbd: 0% user + 0.6% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 0.7% 684/com.android.launcher: 0.7% user + 0% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 0.7% 684/ndroid.launcher: 0.7% user + 0% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 0.7% 691/Binder Thread #: 0.7% user + 0% kernel
02-11 02:58:50.949: ERROR/ActivityManager(365): 100% TOTAL: 40% user + 58% kernel + 0.6% softirq
这里出了什么问题.我需要解决这个问题?
谢谢
最佳答案
这实际上是ANR(活动没有响应)
原文链接:https://www.f2er.com/android/430368.html您的活动需要足够长的时间来执行您提供的任务
下面的链接有关于如何强制它通过线程响应的信息.
您应该在单独的THREAD或Async Task中执行繁重的日志运行任务
Simlar Problen in SO with solution Here
和