卡在“转储内存"中,应用将冻结. Brrr."信息 [英] Stuck at "Dumping memory, app will freeze. Brrr." message

查看:186
本文介绍了卡在“转储内存"中,应用将冻结. Brrr."信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用LeakCanary来检测我的应用程序中的内存泄漏,但是它没有比消息倾销内存,应用程序将冻结.我已经等了大约20分钟,但没有任何变化.这些设备上的行为相同: 1.华硕Fonepad 8(Android 5.0股票) 2. Sony Xperia SP(Android 5.1.1 CM 12.1自定义) 3. HTC Desire C(Android 4.4 CM 11自定义)

I'm trying to use LeakCanary to detect memory leaks in my app, but it does not go further than the message "Dumping memory, app will freeze. Brrr." I've been waiting for about 20 minutes or so, but no changes. Same behaviour on these devices: 1. Asus fonepad 8 (Android 5.0 stock) 2. Sony Xperia SP (Android 5.1.1 CM 12.1 custom) 3. HTC Desire C (Android 4.4 CM 11 custom)

我按照指示进行了所有操作:

I did everything as its advised in instruction:

public class ExampleApplication extends Application {

  @Override public void onCreate() {
    super.onCreate();
    LeakCanary.install(this);
  }
}

推荐答案

如果您使用的是Android M,则需要授予写外部存储"权限,否则泄漏的金丝雀会因brrr消息而挂起很长时间.在您的应用程序抽屉中,长按启动器以查找泄漏金丝雀(就像您要卸载它一样),然后向上拖动至应用程序信息"并打开存储权限.

If you're on Android M you need to grant the "write external storage" permission or leak canary will hang for a long time with the brrr message. In your apps drawer, long click on the launcher for leak canary (like you were going to uninstall it) and drag up to "app info" and turn on the storage permission.

这篇关于卡在“转储内存"中,应用将冻结. Brrr."信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆