1

ANR 总是会中断我的应用程序。

环境:android 4.1 CPU mips 800mz MEM 470m 显示 240*240

我不认为这是我的应用程序的问题。

我在 traces.txt 中找不到有用的信息。

这是traces.txt,最上面的线程日志:

"main" prio=5 tid=1 NATIVE
  | group="main" sCount=1 dsCount=0 obj=0x2be624e0 self=0x557b5780
  | sysTid=1160 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=717388656
  | schedstat=( 0 0 0 ) utm=6371 stm=695 core=0
  #00  pc 00000000  <unknown>
  at android.os.MessageQueue.nativePollOnce(Native Method)
  at android.os.MessageQueue.next(MessageQueue.java:125)
  at android.os.Looper.loop(Looper.java:124)
  at android.app.ActivityThread.main(ActivityThread.java:4745)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:511)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
  at dalvik.system.NativeStart.main(Native Method)

而且log cat ANR,cpu不高。这是 ANR 的 logcat:

06-07 10:55:07.967 E/ActivityManager(  284): ANR in com.android.settings
06-07 10:55:07.967 E/ActivityManager(  284): Reason: Executing service com.android.settings/.bluetooth.DockService
06-07 10:55:07.967 E/ActivityManager(  284): Load: 0.8 / 0.42 / 0.43
06-07 10:55:07.967 E/ActivityManager(  284): CPU usage from 16063ms to 1267ms ago:
06-07 10:55:07.967 E/ActivityManager(  284):   3.3% 284/system_server: 2.7% user + 0.6% kernel / faults: 101 minor
06-07 10:55:07.967 E/ActivityManager(  284):   1.2% 1160/com.android.settings: 1% user + 0.2% kernel / faults: 22 minor
06-07 10:55:07.967 E/ActivityManager(  284):   0.7% 1257/kworker/0:0: 0% user + 0.7% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   0.6% 1982/ksdioirqd/mmc1: 0% user + 0.6% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   0.1% 669/com.android.exchange: 0.1% user + 0% kernel / faults: 47 minor
06-07 10:55:07.967 E/ActivityManager(  284):   0.3% 5/kworker/u:0: 0% user + 0.3% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   0.2% 48/dhd_cfg80211_ev: 0% user + 0.2% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   0.2% 1971/wpa_supplicant: 0% user + 0.2% kernel / faults: 4 minor
06-07 10:55:07.967 E/ActivityManager(  284):   0.1% 50/dhd_dpc: 0% user + 0.1% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   0.1% 95/adbd: 0% user + 0.1% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   0.1% 1868/logcat: 0.1% user + 0% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   0% 38/file-storage: 0% user + 0% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   0% 45/mmcqd/0: 0% user + 0% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   0% 49/dhd_watchdog: 0% user + 0% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   0% 80/vold: 0% user + 0% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   0% 476/com.android.phone: 0% user + 0% kernel / faults: 1 minor
06-07 10:55:07.967 E/ActivityManager(  284): 6.4% TOTAL: 4.5% user + 1.8% kernel
06-07 10:55:07.967 E/ActivityManager(  284): CPU usage from 1069ms to 1619ms later with 99% awake:
06-07 10:55:07.967 E/ActivityManager(  284):   9.2% 284/system_server: 3.7% user + 5.5% kernel / faults: 1 minor
06-07 10:55:07.967 E/ActivityManager(  284):     7.4% 298/ActivityManager: 1.8% user `enter code here+ 5.5% kernel
06-07 10:55:07.967 E/ActivityManager(  284):     1.8% 316/InputDispatcher: 1.8% user + 0% kernel
06-07 10:55:07.967 E/ActivityManager(  284):     1.8% 317/InputReader: 1.8% user + 0% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   0.7% 5/kworker/u:0: 0% user + 0.7% kernel
06-07 10:55:07.967 E/ActivityManager(  284):   1.8% 1160/com.android.settings: 0% user + 1.8% kernel
06-07 10:55:07.967 E/ActivityManager(  284): 12% TOTAL: 3.6% user + 9% kernel

============ full tr​​aces.txt=================== 到大,我在我的博客中提交:

http://bocaidong.sinaapp.com/?p=145

4

0 回答 0