【问题标题】:Can't convert dump HPROF file from Android Studio to MAT format无法将转储 HPROF 文件从 Android Studio 转换为 MAT 格式
【发布时间】:2016-06-13 12:34:34
【问题描述】:

当我尝试将 android studio 终端中的 HPROF 文件转换为 MAT 格式时:

1) hprof-conv [-z] d:/dump.hprof d:/outfile.hprof

2) hprof-conv d:/dump.hprof d:/outfile.hprof

我也有同样的答案:

用法:hprof-conf [-z] infile outfile

-z:排除非应用堆,例如Zygote

为一个或两个文件指定“-”以使用标准输入/标准输出。

版权所有 (C) 2009 Android 开源项目

该软件是根据 Apache 许可证许可的源代码构建的, 2.0 版(“许可证”)。您可以在

处获取许可证的副本
http://www.apache.org/licenses/LICENSE-2.0

有关详细信息,请参阅此软件的相关通知文件。

但 hprof-conf 命令在 android 平台工具中不存在。

如何转换文件?

【问题讨论】:

    标签: android hprof


    【解决方案1】:

    我遇到了这个问题,我认为它与权限有关。

    可以通过将输入的 .hprof 文件复制到“platform-tools/”目录并将输出文件指定为没有权限的地方来修复。

    例如。

    hprof-conv in.hprof C:/Users/whatever_name/Desktop/out.hprof

    【讨论】:

      【解决方案2】:

      我也被困在这个问题上很长一段时间了。看来您已经找到 hprof-conv.exe 并且正在按您应该的方式运行它。对我有用的是将文件放入'platform-tools /'中的位置,然后像这样运行它:

      hprof-conv myinputdump.hprof myoutputdump.hprof

      当我这样写的时候收到了你的回复:

      hprof-conv ~/in.hprof ~/out.hprof

      并将 -z 放在命令中的任何位置都没有得到我的任何地方。

      所以,只需使用 hprof-conv,然后是文件名,然后是输出文件名。我知道放置路径字符(如“~/”和您的“D:/”)并不重要,但排除它们对我有用,它可能对你有用。

      【讨论】:

      • 我写的像 hprof-conv ~/in.hprof ~/out.hprof 然后尝试 hprof-conv in.hprof out.hprof。不要工作。写下关于许可证的相同答案。可能我应该下载许可证,但在哪里以及如何下载?
      猜你喜欢
      • 2015-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-09
      相关资源
      最近更新 更多