How to use Leak Canary

后端 未结 5 1730
悲&欢浪女
悲&欢浪女 2020-12-24 05:57

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

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-24 06:45

    Posting this answer because all other answers are no longer needed and there's a better way to find leaks on your app using Leak Canary 2.

    Just add below dependency to your gradle. No more code needed.

    debugImplementation 'com.squareup.leakcananry:leakcanary-android:2.2'
    

提交回复
热议问题