我的應用程序因爲下面的錯誤而被凍結。 如何解決此錯誤。應用中的ANR錯誤?
11-06 13:29:44.546 616-632/? E/ActivityManager﹕ ANR in com.creation.android (com.creation.android/.app.MainActivity)
PID: 21593
Reason: Input dispatching timed out (Waiting because the touched window has not finished processing the input events that were previously delivered to it.)
Load: 5.49/4.98/4.76
CPU usage from 33706ms to 0ms ago:
73% 21593/com.creation.android: 72% user + 0.6% kernel/faults: 1150 minor
0.9% 616/system_server: 0.6% user + 0.3% kernel/faults: 213 minor
0.5% 190/mpdecision: 0% user + 0.5% kernel
0.4% 690/RX_Thread: 0% user + 0.4% kernel
0.3% 215/sensors.qcom: 0% user + 0.2% kernel
0.2% 672/com.android.systemui: 0.2% user + 0% kernel/faults: 1 minor
0.2% 20741/kworker/0:2: 0% user + 0.2% kernel
0.1% 20646/kworker/u:0: 0% user + 0.1% kernel
0.1% 178/surfaceflinger: 0% user + 0% kernel
0% 20804/kworker/u:1: 0% user + 0% kernel
0% 133/dbs_sync/0: 0% user + 0% kernel
0% 688/MC_Thread: 0% user + 0% kernel
0% 689/TX_Thread: 0% user + 0% kernel
0% 757/wpa_supplicant: 0% user + 0% kernel
0% 2758/com.android.vending: 0% user + 0% kernel
0% 18909/com.facebook.katana:dash: 0% user + 0% kernel/faults: 7 minor
0% 20378/com.facebook.katana: 0% user + 0% kernel/faults: 38 minor
0% 21106/kworker/0:1: 0% user + 0% kernel
+0% 21762/migration/1: 0% user + 0% kernel
+0% 21763/kworker/1:0: 0% user + 0% kernel
+0% 21764/ksoftirqd/1: 0% user + 0% kernel
+0% 21765/kworker/1:1: 0% user + 0% kernel
45% TOTAL: 43% user + 1.1% kernel + 0% softirq
CPU usage from 2905ms to 3429ms later:
101% 21593/com.creation.android: 100% user + 1.8% kernel/faults: 13 minor
100% 21593/reation.android: 98% user + 1.8% kernel
1.8% 21672/cling-15: 1.8% user + 0% kernel
5.6% 616/system_server: 0% user + 5.6% kernel/faults: 1 minor
3.7% 632/ActivityManager: 0% user + 3.7% kernel
55% TOTAL: 50% user + 4.7% kernel
您的應用程序在主線程上執行長時間運行的任務,這需要脫穎而出。 – 2014-11-06 08:11:55
process'com.creation.android'佔CPU的73〜101%?顯示你的代碼。 – Raptor 2014-11-06 08:12:19
這個偉大的人做了一些有用的東西,請找到回購鏈接https://github.com/SalomonBrys/ANR-WatchDog夢幻般的工作夥計。 – Avi 2017-01-28 06:54:07