打开AndroidStudio自带的Android Device Monitor,切换到DDMS下的heap选项卡,一开始上来是下面这个样子,Heap updates are NOT ENABLED for this client


如何进行Cause GC且解决Heap updates are NOT ENABLED for this client


查了查资料,让我打开Monitor偏好设置里的Heap updates enabled by default


如何进行Cause GC且解决Heap updates are NOT ENABLED for this client

如何进行Cause GC且解决Heap updates are NOT ENABLED for this client


保存上面的设置后,我退出,重启了Android Device Monitor,打开之后,如下:


如何进行Cause GC且解决Heap updates are NOT ENABLED for this client


Cause GC按钮左侧有了数据,但是连续点击Cause GC按钮,只有上面的红框数据发生变化,而下面的红框中没有数据。



后来发现,根本不用设置上面的Heap updates enabled by default  =.=

只需要选中Update Heap,然后连续点击Cause GC按钮即可,

如下图,标出了这两个选项,里头标A的地方是Update Heap, 标B的地方是Cause GC,效果都一样:


如何进行Cause GC且解决Heap updates are NOT ENABLED for this client







相关文章:

  • 2021-11-14
  • 2022-12-23
  • 2022-01-20
  • 2022-01-14
  • 2021-08-16
  • 2021-12-10
猜你喜欢
  • 2022-01-07
  • 2021-12-30
  • 2021-10-08
  • 2022-02-04
  • 2021-12-31
  • 2022-12-23
  • 2021-11-12
相关资源
相似解决方案