android-------Android Studio encounters errors using the MAT analysis tool

Today I mainly introduce an error I encountered when using the MAT tool to analyze the file

Error opening heap dump 'a.hprof'. Check the error log for further details.
Error opening heap dump 'a.hprof'. Check the error log for further details.
Unknown HPROF Version (JAVA PROFILE 1.0.3) (java.io.IOException)
Unknown HPROF Version (JAVA PROFILE 1.0.3)

 

The reason is: The hprof file format of the memory file exported by the android virtual machine is different from the standard java hprof file format standard. The root cause is that the virtual machines of the two are inconsistent.

Just use the conversion tool that comes with the SDK to convert

 

Open MAT

Importing files

 

 

I import the above error, how to solve it next?

Just use the conversion tool that comes with the SDK to convert

Next, we cd to this path and execute this command to convert our hprof file, as shown below

 

Where the hprof-conv command uses 
the new file path of the hprof-conv source file like this

 

 

Import the b.hprof file and you can succeed

 

Click Finish to generate the report

 

indicate success

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324410627&siteId=291194637