androidddmsandroid-traceview

Can't open saved tracefile in TraceView - fails with "File could not be found"


I want to open a saved .trace file, which I created using Debug.startMethodTracing() directly from the code. However, after copying it to my PC and trying to open it in DDMS, I get the error "The File [myfile].trace could not be found", which is strange, since I can open and read the file in Notepad without issues.


Solution

  • Upon further investigation, I found it strange that DDMS didn't show a "Modified date" for the particular file, in comparison to other traces that opened fine:

    enter image description here

    The file preferences showed modified date of 01.01.1970, which seemed to cause issues for DDMS. I just opened the file, added a minor modification (a space or something) and saved it again to have a proper modified date. Now DDMS can open the file again.