Cannot find Debug.startMethodTracing() trace file
I am having trouching using Debug.startMethodTracing() with my Samsung Galaxy S.
According to the Android docs, Debug.startMethodTracing("filename")
writes to /sdcard/filename.trace, but I cannot find this file or folder in the DDMS File Explorer. The folder /sdcard is simply not there.
I've tried:
Debug.startMethodTracing("filename")
Debug.startMethodTracing("/mnt/sdcard/filename")
Debug.startMethodTracing("/mnt/sdcard/tmp/filename开发者_如何学运维")
The first two attempts did not report an error but I couldn't find the files in DDMS File Explorer. The third generated a runtime exception stating I didn't have permission to write to that folder.
Any advice is much appreciated.
Thanks in advance,
Barry
You probably need to add WRITE_EXTERNAL_STORAGE to your manifest
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
精彩评论