error opening HPROF file: IOException: Unknown HPROF Version

后端 未结 3 1716
醉话见心
醉话见心 2020-12-04 06:37

I am getting the following exception when trying to open HPROF file (created by Debug.dumpHprofData) with Memory Analyzer:

java.io.IOException:          


        
相关标签:
3条回答
  • 2020-12-04 07:15

    If you are using Eclipse, just change the following:

    1. Open Preferences (from the Window menu)
    2. Navigate to Android->DDMS
    3. Change the HPROF action to "Open in Eclipse"
    0 讨论(0)
  • 2020-12-04 07:26

    The hprof file you get from Android has android specific format. You should convert hprof file take from Android OS into standard hprof format. For this you can use hprof-conv tool that is located at AndroidSDK/tools/hprof-conv.

    For example:

    hprof-conv android.hprof mat.hprof
    

    And then open mat.hprof in Memory Analyzer.

    EDIT: hprof-conv might be located under AndroidSDK/platform-tools/ in some bundles.

    0 讨论(0)
  • 2020-12-04 07:28

    hprof-conv tool location got changed.

    It is now located at AndroidSDK/platform-tools/hprof-conv

    0 讨论(0)
提交回复
热议问题