這貨的使用也是很簡單,兩步:
1 添加庫到項目
as里直接在gradle腳本里添加依賴即可:
dependencies { debugCompile ‘com.squareup.leakcanary:leakcanary-android:1.3.1’ releaseCompile ‘com.squareup.leakcanary:leakcanary-android-no-op:1.3.1’ }
2 應用里安裝
public class Exampleapplication extends Application {
@Override public void onCreate() { super.onCreate(); LeakCanary.install(this); } }
新聞熱點
疑難解答