简体   繁体   English

如何在Android Studio 1.5中查看活动和类的泄漏

[英]How to view leaks of Activities and Classes in Android Studio 1.5

I had downloaded the android-studio 1.5 new version from the following link 我已经从以下链接下载了android-studio 1.5新版本

Here is the link 链接在这里

I want to view the leaks in the activity and class. 我想查看活动和课程中的漏洞。 I'm struggling to find that tool, please anyone could help me out this.... 我正在努力寻找该工具,请任何人都可以帮我解决这个问题。

You can use LeakCanary library in your project to trace the leaks in your application. 您可以在项目中使用LeakCanary库来跟踪应用程序中的泄漏。 It is very easy to integrate 整合非常容易

from http://developer.android.com/tools/revisions/studio.html : 来自http://developer.android.com/tools/revisions/studio.html

Added new Memory Monitor analysis abilities to Android Monitor. 向Android Monitor添加了新的Memory Monitor分析功能。 When you view an HPROF file captured from this monitor, the display is now more helpful so you can more quickly locate problems, such as memory leaks. 现在,当您查看从此监视器捕获的HPROF文件时,该显示将更加有用,因此您可以更快地定位问题,例如内存泄漏。 To use this monitor, click Android Monitor at the bottom of the main window. 要使用此监视器,请单击主窗口底部的Android监视器。 In Android Monitor, click the Memory tab. 在Android Monitor中,单击“内存”选项卡。 While the monitor is running, click the Dump Java Heap icon, and then click Captures in the main window and double-click the file to view it. 在监视器运行时,单击“转储Java堆”图标,然后在主窗口中单击“捕获”,然后双击该文件以进行查看。 (The Android Device Monitor can't be running at the same time as Android Monitor.) (Android设备监视器不能与Android Monitor同时运行。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM