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 | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Leak Canary 1.4 does not work with the Jack toolchain

    GitHub | 6 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)
  2. 0

    Turn on ART mode in the developer options,system boot failed

    Stack Overflow | 2 years ago | Gao Liquan
    java.lang.NoSuchMethodError: No virtual method setTargetHeapMinFree(I)F in class Ldalvik/system/VMRuntime; or its super classes (declaration of 'dalvik.system.VMRuntime' appears in /system/framework/core-libart.jar)

    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