Android的,traceview的独立版本是德precated [英] Android, the standalone version of traceview is deprecated
问题描述
我要见我的痕迹。
1在code,我已经加入了code这几行:
1- In code, I have added these lines of code:
// Start trace recording
android.os.Debug.startMethodTracing("hc_traceview");
和
// Stop trace recording
android.os.Debug.stopMethodTracing();
2 - 我可以看到 hc_traceview.terac
,在DDMS的文件浏览器。
2- I can see "hc_traceview.terac
" in file explorer of DDMS.
3基于在Traceview 查看跟踪文件,我跑在下面的命令终端:
3- Based on Viewing Trace Files in Traceview, I ran following command in terminal:
@hesam-K5VD:~/Desktop/Eclipse/sdk/tools$ traceview /mnt/sdcard/hc_traceview
但放出来的是:
But out put is:
The standalone version of traceview is deprecated.
Please use Android Device Monitor (tools/monitor) instead.
trace file '/mnt/sdcard/hc_traceview' not found
4-根据建议,我跑下面的命令在终端:
4- Based on suggestion, I ran following command in terminal:
@hesam-K5VD:~/Desktop/Eclipse/sdk/tools$ monitor /mnt/sdcard/hc_traceview
打开
DDMS,但我的痕迹在这里不是:( 我怎么能看到我的痕迹?
DDMS opened but my traces are not here :( How can I see my traces?
任何建议将AP preciated。
Any suggestion would be appreciated.
推荐答案
请看看这里:的 DDMS
页说,你可以启动和停止方法分析内DDMS像这样的:
The page says you can start and stop method profiling inside DDMS view like this:
- 从Eclipse在调试模式中启动应用程序。
- 转至DDMS视图
- 在设备窗口有一个小按钮,名为开始方法剖析
- 点击它时,你想要的(你可以用破发点结合起来,以获得准确的开始/结束)
- 当你完成点击停止方法剖析
- 在新窗口中DDMS会出现similer到traceview具有相同的输出。
- Launch your app from eclipse in debugging mode.
- Go to DDMS View
- In devices window there is a small button called Start Method Profiling
- Click it when you want ( you can combine it with break points to get accurate start/end)
- when you're done click Stop Method Profiling
- A new window in DDMS will appear similer to traceview with the same output.
这篇关于Android的,traceview的独立版本是德precated的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!