Android的 - 无法使用traceviewAndroid、traceview

由网友(荼色山野)分享简介:我想使用traceview在其上运行Android应用程序的一些分析。我曾经包裹,我想跟踪与以下行code:I am trying to use traceview to run some profiling against an Android application. I have wrapped the cod...

我想使用traceview在其上运行Android应用程序的一些分析。我曾经包裹,我想跟踪与以下行code:

I am trying to use traceview to run some profiling against an Android application. I have wrapped the code that I want to trace with the following lines:

Debug.startMethodTracing("xxx");
// code
Debug.stopMethodTracing();

它成功地生成一个跟踪文件,我从SD卡使用下面的命令行拉:

It successfully generated a trace file, that I pulled from sdcard using the following command line:

./亚行拉/sdcard/xxx.trace

./adb pull /sdcard/xxx.trace

然而 traceview 是这样的:

./ traceview /.../ xxx.trace

./traceview /.../xxx.trace

我收到以下错误消息:

用法:JAVA   com.android.traceview.MainWindow [-r]   跟踪-r回归仅

android 官网无法访问的解决方法

Usage: java com.android.traceview.MainWindow [-r] trace -r regression only

我不明白此错误消息,我没有发现任何有用的谷歌。

I cannot understand this error message and I didn't find anything useful on Google.

任何帮助将是非常美联社preciated。

Any help would be much appreciated.

谢谢!

推荐答案

请确保您导入Debug类是这个: android.os.Debug

make sure that Debug class you imported is this one : android.os.Debug

或做到这一点:

android.os.Debug.startMethodTracing("xxx");
android.os.Debug.stopMethodTracing();
阅读全文

相关推荐

最新文章