今天我准备生成一个trace文件,看看程序卡在哪里。
一般:

Debug.startMethodTracing(“yuge”);
Debug.stopMethodTracing();

这样写就会在/sdcard/下面生成一个yuge.trace 的文件。

但是今天试了两次,生成的yuge.trace文件,大小都是0.

解决办法:

各位看客老爷看好了,关键来了:原来是因为我写了
Debug.startMethodTracing(“yuge”);但是没有对应的
Debug.stopMethodTracing();所以,如果出现了这个问题,你可以去看一下是不是你的 Debug.stopMethodTracing();是不是执行了。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-28
  • 2021-11-17
  • 2021-08-11
  • 2021-12-09
相关资源
相似解决方案