編輯:中級開發
雖然traces.txt是一個文本文件,不過使用windows上的記事本打開可能無法正常處理Linux的換行符,這裡Android123建議你使用ultra edit查看,當然了使用Windows自帶的寫字板也是不錯的。下面一起來分析下錯誤吧,第一行為出錯的時間,第二行都會寫上發生ANR的package Name,下文是com.android.systemui這個包,裡面的部分線程出了問題,通過下面的的xxx方法以及對應的java文件,後面的數字為xxx.Java文件的第幾行,是不是很方便呢?
----- pid 125 at 2011-02-22 05:18:01 -----
Cmd line: com.android.systemui
DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0 hwl=0 hwll=0)
"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4001f1a8 self=0xce48
| sysTid=125 nice=0 sched=0/0 cgrp=default handle=-1345006528
| schedstat=( 981213067 8042604425 151 )
at android.os.BinderProxy.transact(Native Method)
at android.os.storage.IMountService$Stub$Proxy.isUsbMassStorageConnected(IMountService.Java:95)
at android.os.storage.StorageManager.isUsbMassStorageConnected(StorageManager.Java:385)
at com.android.systemui.usb.StorageNotification.<init>(StorageNotification.Java:71)
at com.android.systemui.statusbar.policy.StatusBarPolicy.<init>(StatusBarPolicy.Java:412)
at com.android.systemui.statusbar.StatusBarService.onCreate(StatusBarService.Java:239)
at android.app.ActivityThread.handleCreateService(ActivityThread.Java:1920)
at android.app.ActivityThread.Access$2500(ActivityThread.Java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.Java:982)
at android.os.Handler.dispatchMessage(Handler.Java:99)
at android.os.Looper.loop(Looper.Java:123)
at android.app.ActivityThread.main(ActivityThread.Java:3647)
at Java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.Java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.Java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.Java:597)
at dalvik.system.NativeStart.main(Native Method)
"Binder Thread #2" prio=5 tid=8 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x40511270 self=0x1c1100
| sysTid=153 nice=0 sched=0/0 cgrp=default handle=1141608
| schedstat=( 27181321 64708345 5 )
at dalvik.system.NativeStart.run(Native Method)
"Binder Thread #1" prio=5 tid=7 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x405111a8 self=0x1349c8
| sysTid=152 nice=0 sched=0/0 cgrp=default handle=1264008
| schedstat=( 31857510 74284459 5 )
at dalvik.system.NativeStart.run(Native Method)
"Compiler" daemon prio=5 tid=6 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x4050dd10 self=0x116538
| sysTid=144 nice=0 sched=0/0 cgrp=default handle=982520
| schedstat=( 7319346 103454345 12 )
at dalvik.system.NativeStart.run(Native Method)
"JDWP" daemon prio=5 tid=5 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x4050dc60 self=0x116400
| sysTid=142 nice=0 sched=0/0 cgrp=default handle=986536
| schedstat=( 32876840 393298925 20 )
at dalvik.system.NativeStart.run(Native Method)
"Signal Catcher" daemon prio=5 tid=4 RUNNABLE
| group="system" sCount=0 dsCount=0 obj=0x4050dba0 self=0x253ab0
| sysTid=141 nice=0 sched=0/0 cgrp=default handle=2439792
| schedstat=( 94447996 796994478 19 )
at dalvik.system.NativeStart.run(Native Method)
"GC" daemon prio=5 tid=3 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x4050daf8 self=0x8fd40
| sysTid=128 nice=0 sched=0/0 cgrp=default handle=2439592
| schedstat=( 103352102 819201761 21 )
at dalvik.system.NativeStart.run(Native Method)
"HeapWorker" daemon prio=5 tid=2 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x4050da40 self=0xf0c70
| sysTid=127 nice=0 sched=0/0 cgrp=default handle=2439528
| schedstat=( 971134410 6445300652 103 )
at dalvik.system.NativeStart.run(Native Method)
----- end 125 -----
簡介: Java™ 語言是 Android 開發人員所選的工具。android 運行時使用自己的虛擬機 Dalvik,這並不是多數程序開發人員使用
簡介: 學習如何使用混合應用程序編程模型為 WebSphere® Commerce 構建移動應用程序。本文描述混合模型,它與其他移動應用程序編程模型的
這幾天搞了搞AIDL,終於弄明白了在AIDL中讓Service調用Activity的方法代碼:首先建立一個ICallback.aidl文件,作為Activity中的回調
Fragment是Android honeycomb 3.0新增的概念,Fragment名為碎片不過卻和Activity十分相似,下面Android123介紹下andr