2010-03-27 64 views
0

我試圖通過安卓Traceviewer

Debug.startMethodTracing("sampletrace"); 

Debug.stopMethodTracing(); 

使用跟蹤查看器和我拉sampletrace到一個文件夾從SD卡。

當我嘗試使用以下命令查看跟蹤文件時。

D:\Android\android-sdk-windows\tools>traceview D:\trace\sampletrace.trace 

它顯示以下行

Key section does not have an *end marker 

任何人能請解釋一下這是什麼?

回答

2

您需要調用相應的Debug.stopMethodTracing()。如果沒有這個調用跟蹤是不完整的,當你嘗試加載它在traceviewer

3
在Eclipse文件瀏覽器窗口

你會看到這個標記錯誤,在SD卡的traceview文件大小爲0,因爲 你不能正確在代碼中調用Debug.stopMethodTracing()方法。 當你完成你的申請時,你必須給它打電話。 當您在模擬器中完成您的應用程序時,您的traceview文件大小現在不是0(零)。 現在執行您在api中描述的下一步。