java.lang.NoSuchMethodError: No direct method <init>(Ljava/util/concurrent/Executor;Lcom/squareup/leakcanary/DebuggerControl;Lcom/squareup/leakcanary/GcTrigger;Lcom/squareup/leakcanary/HeapDumper;Lcom/squareup/leakcanary/HeapDump$Listener;Lcom/squareup/leakcanary/ExcludedRefs;)V in class Lcom/squareup/leakcanary/RefWatcher; or its super classes (declaration of 'com.squareup.leakcanary.RefWatcher' appears in /data/app/com.myapp.debug-2/base.apk)

GitHub | kypeli | 5 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Leak Canary 1.4 does not work with the Jack toolchain

    GitHub | 5 months ago | kypeli
    java.lang.NoSuchMethodError: No direct method <init>(Ljava/util/concurrent/Executor;Lcom/squareup/leakcanary/DebuggerControl;Lcom/squareup/leakcanary/GcTrigger;Lcom/squareup/leakcanary/HeapDumper;Lcom/squareup/leakcanary/HeapDump$Listener;Lcom/squareup/leakcanary/ExcludedRefs;)V in class Lcom/squareup/leakcanary/RefWatcher; or its super classes (declaration of 'com.squareup.leakcanary.RefWatcher' appears in /data/app/com.myapp.debug-2/base.apk)

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      No direct method <init>(Ljava/util/concurrent/Executor;Lcom/squareup/leakcanary/DebuggerControl;Lcom/squareup/leakcanary/GcTrigger;Lcom/squareup/leakcanary/HeapDumper;Lcom/squareup/leakcanary/HeapDump$Listener;Lcom/squareup/leakcanary/ExcludedRefs;)V in class Lcom/squareup/leakcanary/RefWatcher; or its super classes (declaration of 'com.squareup.leakcanary.RefWatcher' appears in /data/app/com.myapp.debug-2/base.apk)

      at com.squareup.leakcanary.LeakCanary.androidWatcher()
    2. com.squareup.leakcanary
      LeakCanary.install
      1. com.squareup.leakcanary.LeakCanary.androidWatcher(LeakCanary.java:75)
      2. com.squareup.leakcanary.LeakCanary.install(LeakCanary.java:58)
      3. com.squareup.leakcanary.LeakCanary.install(LeakCanary.java:41)
      3 frames
    3. com.myapp
      MyApplication.onCreate
      1. com.myapp.MyApplication.onCreate(MyApplication.java:35)
      1 frame
    4. Android Platform
      ActivityThread.handleBindApplication
      1. android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
      2. android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
      2 frames