痛点:
解决方案:
setOnClickListener()
定位actionButton.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
// deleteVisibleLeak();
Toast.makeText(DisplayLeakActivity.this, "Operating rejected!", Toast.LENGTH_SHORT).show();
}
});
actionButton.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
// deleteAllLeaks();
Toast.makeText(DisplayLeakActivity.this, "Operating rejected!", Toast.LENGTH_SHORT).show();
}
});
compile(name: 'leakcanary-android-debug', ext: 'aar')
compile(name: 'leakcanary-analyzer-debug', ext: 'aar')
compile(name: 'leakcanary-watcher-debug', ext: 'aar')
compile 'com.squareup.haha:haha:2.0.3'
只需改动一处,上面的修改太麻烦
refWatcher = LeakCanary.install(this);
LeakCanaryInternals.setEnabled(this, DisplayLeakActivity.class, false);
泄露信息需要手动配置上传服务器,或者从 sd 卡拉回来