【问题标题】:Memory Analyzer (MAT) plugin not opening heap prof in MAT Eclipse 4.1.2 automaticallyMemory Analyzer (MAT) 插件未在 MAT Eclipse 4.1.2 中自动打开堆 prof
【发布时间】:2012-03-29 14:46:22
【问题描述】:
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)

【问题讨论】:

    标签: android eclipse eclipse-memory-analyzer


    【解决方案1】:

    试试这个:

    在 eclipse -> windows -> 首选项 -> android --> ddms -> HPROF Action 菜单

    选择:在eclipse中打开

    【讨论】:

    【解决方案2】:

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

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

    hprof-conv <infile> <outfile>
    

    更多信息请访问HPROF Converter

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

    【讨论】:

    • 如果您使用的是 Android Studio/Android Device Monitor,这是您使用内存分析器打开 hprof 文件所需的工具。谢谢@Aduait
    【解决方案3】:

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

    Window -> Preferences -> Android ->(按箭头展开 Android View)DDMS -> HPROF Action -> 选择“在 Eclipse 中打开” 参考图片

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-09-24
      • 2018-07-02
      • 2011-11-29
      • 2018-06-25
      • 2021-09-14
      • 2018-06-09
      • 1970-01-01
      相关资源
      最近更新 更多