Tag: leakcanary

LeakCanary spots Android WebView memory leak

I’ve been using the a tool leakcanary to spot memory leakages in my application. It seems my WebViewActivity leaks everytime. I created a simple application to test the leakages. I start a Activity with a WebView inside xml layout file/inflate with activity context. Js off. Everything default expect a simple webViewClient keeping redirection within the […]

How to understand that shows LeakCanary?

I have installed in your proetk LeackCanary library. It found a memory leak, and brought me information may be requested of it, but I can not understand it because I do not have such practices in the classroom. How to understand exactly where the error is and how to fix it? Thank you. public final […]

how to use leakcanary, how to add leakcanary as a jar to build a apk with .mk file

LeakCanary is a memory leak detection library for Android and Java. LeakCanary My project is based on android make file system, which relies on some android internal interfaces and custom methods. How can I add the LeakCanary as a lib into my app to detect memory leak. My solution: First, I have to build the […]

SharedElement and custom EnterTransition causes memory leak

Having a shared element animation and also a custom enter animation causes the activity to leak. Any idea what might be the cause? 09-21 16:19:31.007 28269-31066/com.sample.android D/LeakCanary﹕ * com.feeln.android.activity.MovieDetailActivity has leaked: 09-21 16:19:31.007 28269-31066/com.sample.android D/LeakCanary﹕ * GC ROOT android.app.ActivityThread$ApplicationThread.this$0 09-21 16:19:31.007 28269-31066/com.sample.android D/LeakCanary﹕ * references android.app.ActivityThread.mActivities 09-21 16:19:31.007 28269-31066/com.sample.android D/LeakCanary﹕ * references android.util.ArrayMap.mArray 09-21 16:19:31.007 […]

DisplayLeakActivity does not exist

Since a while I have problems with LeakCanary (I think since Android Studio 2.2 but not sure) I added it with this dependencies dependencies { debugCompile ‘com.squareup.leakcanary:leakcanary-android:1.4-beta2’ releaseCompile ‘com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2’ testCompile ‘com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2’ } When I click on the play button in Android Studio I get this error message: $ adb shell am start -n “com.example.debug/com.squareup.leakcanary.internal.DisplayLeakActivity” -a […]

MapView v2 keeping Context around

When using the MapView from the latest google maps API, I am getting a memory leak because MapView is holding onto my activity. I used Leak Canary and have this trace D/LeakCanary﹕ * GC ROOT com.google.android.gms.location.internal.t.a D/LeakCanary﹕ * references com.google.android.gms.location.internal.s.a D/LeakCanary﹕ * references com.google.maps.api.android.lib6.d.v.c D/LeakCanary﹕ * references com.google.maps.api.android.lib6.d.aj.b D/LeakCanary﹕ * references com.google.maps.api.android.lib6.gmm6.c.p.a D/LeakCanary﹕ * references […]

Why is this a memory leak

I came across a library for memory leak detection in Android (Java) called LeakCanary but cannot understand the example where they leak the memory. Could anybody please explain how and why the code shown in their example is a memory leak. class Cat { } class Box { Cat hiddenCat; } class Docker { static […]

How to use Leak Canary

I know this is probably a dumb question, but I am pretty new at developing android, and I currently experiencing an OutOfMemoryError in my apps, which I have tried to debug using MAT, but it is still too hard to find the leak in a few activities, then I found LeakCanary, which seems simpler and […]

Memory leak in Fragment

I am using the LeakCanary library to monitor memory leaks in my app. I received this memory leak and not sure how to track down what is causing it. 05-09 09:32:14.731 28497-31220/? D/LeakCanary﹕ In com.etiennelawlor.minesweeper:0.0.21:21. * com.etiennelawlor.minesweeper.fragments.MinesweeperFragment has leaked: * GC ROOT com.google.android.gms.games.internal.GamesClientImpl$PopupLocationInfoBinderCallbacks.zzahO * references com.google.android.gms.games.internal.PopupManager$PopupManagerHCMR1.zzajo * references com.google.android.gms.games.internal.GamesClientImpl.mContext * references com.etiennelawlor.minesweeper.activities.MinesweeperActivity.mFragments * references android.app.FragmentManagerImpl.mAdded […]

MainActivity leaked using leakcanary

I am using Leak Canary to track memory leak and it says the following were leaked: static hk.o references ht.a leaks MainActivity instance what is the hk.o and ht.a? I dont have them in my MainActivity.

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.