Android trace file created but zero bytes long

只谈情不闲聊 提交于 2019-12-07 01:26:39

问题


I am trying to follow the instructions on this page to create a trace file. I can see the file in File Explorer in DDMS and can pull it onto my PC but it is zero bytes long.

Any suggestions as to what I might be doing wrong, please?


回答1:


The problem seems to have been that the stopMethodTracing() call which I had put in the onDestroy() method (as suggested in the Dev Guide) failed to stop the tracing even though I had tried three different means of ending the activity ... rotating the screen, pressing the Home Key and using Taskiller to kill the app.

By moving the stopMethodTracing() elsewhere I now have a trace with data in it!

(The vital clue was that I noticed that LogCat was reporting TRACE STARTED but never reported TRACE STOPPED.)



来源:https://stackoverflow.com/questions/2180387/android-trace-file-created-but-zero-bytes-long

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!