应用中的ANR错误?

时间:2014-11-06 08:09:08

标签: android

我的应用程序因为以下错误而冻结。 如何解决此错误。

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

1 个答案:

答案 0 :(得分:2)

您可以获取ANR的详细日志以找到ANR的原因并解决它

您需要使用以下命令获取文件

adb pull /data/anr/traces.txt <path-to-distination>