Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CrandellWS/245cdba350abd77ef8997a3a34d90d57 to your computer and use it in GitHub Desktop.
Save CrandellWS/245cdba350abd77ef8997a3a34d90d57 to your computer and use it in GitHub Desktop.
leakcanary-android-no-op - Class,Method not found solution
// app/src/debug/java/com/akhil/sampleapp/CustomMultiDexApplication.java
package com.akhil.sampleapp;
import android.support.multidex.MultiDexApplication;
import com.squareup.leakcanary.AndroidExcludedRefs;
import com.squareup.leakcanary.LeakCanary;
import com.squareup.leakcanary.RefWatcher;
public class CustomMultiDexApplication extends MultiDexApplication {
public RefWatcher refWatcher;
@Override
public void onCreate() {
super.onCreate();
refWatcher = LeakCanary.install(this, LeakSlackUploadService.class, AndroidExcludedRefs.createAppDefaults().build());
}
}
// app/src/release/java/com/akhil/sampleapp/CustomMultiDexApplication.java
package com.akhil.sampleapp;
import android.support.multidex.MultiDexApplication;
import com.squareup.leakcanary.RefWatcher;
public class CustomMultiDexApplication extends MultiDexApplication {
public RefWatcher refWatcher;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment