Memory Analyzer(MAT)插件无法自动在MAT Eclipse 4.1.2中打开堆教程

时间:2012-03-13 07:34:46

标签: android eclipse eclipse-memory-analyzer

Eclipse SDK

Version: 4.1.2
Build id: M20120223-0900
Memory Analyzer 1.1.1.201108240735  Eclipse Memory Analyzer

嗨,我已经将我的eclipse更新到最新版本,也安装了Eclipse MAT插件但是当我点击“转储HPROF文件”时它不会在MAT中打开而是让我选择保存HPROF文件。

以前它会在eclipse MAT中自动打开它。请告诉我如何解决这个问题?

我还切换到“内存分析”透视图并试图打开HPROF文件,但它会引发我跟踪错误

Error opening heap dump 'com.game.hprof'. Check the error log for further details.
Error opening heap dump 'com.game.hprof.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)

3 个答案:

答案 0 :(得分:16)

试试这个:

日食中的

- >窗户 - >偏好 - > android - > ddms - > HPROF行动菜单

选择:在eclipse中打开

答案 1 :(得分:13)

您可以使用android sdk中提供的 HPROF Converter 工具。

hprof-conv 工具将Android SDK工具生成的HPROF文件转换为标准格式,以便您可以在自己选择的性能分析工具中查看该文件。

hprof-conv <infile> <outfile>

更多HPROF Converter

转换文件后,没有任何问题。

答案 2 :(得分:8)

在较新版本的eclipse中,我们需要设置HPROF文件的默认功能,默认为“保存到磁盘”。 请按照以下步骤解决此问题:)

窗口 - &gt;偏好 - &gt; Android - &gt; (按箭头展开Android视图)DDMS - &gt; HPROF行动 - &gt;选择“在Eclipse中打开” 查看图片以供参考

enter image description here