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)

Hot problem!
This exception has a lot of traffic. You can help 18 users by writing a short tip.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by kypeli
, 1 year ago
;)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)
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(LeakCanary.java:75)
at com.squareup.leakcanary.LeakCanary.install(LeakCanary.java:58)
at com.squareup.leakcanary.LeakCanary.install(LeakCanary.java:41)
at com.myapp.MyApplication.onCreate(MyApplication.java:35)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.