Leakcanary: Can't find method isInAnalyzerProcess in leakcanary-android-no-op

Created on 19 Sep 2016  路  10Comments  路  Source: square/leakcanary

in release version, the code below gets a compile error.

private void installLeakCanary() { if (!LeakCanary.isInAnalyzerProcess(this)) { LeakCanary.install(this); } }

Most helpful comment

1.5 will be released soon. In the meantime, the work around would be to have a DebugApplication and move the LeakCanary init code there.

All 10 comments

I have the same issue.

me too

I have same issue too

@akhgupta I already add method isInAnalyzerProcess in leakcanary-android-no-op by myself.

This is just because the no-op version of the library doesn't have isInAnalyzerProcess(), right?

@colinrtwhite That's right.

Is there a work-around for this issue aside from running the 1.5 snapshots? Thanks!

1.5 will be released soon. In the meantime, the work around would be to have a DebugApplication and move the LeakCanary init code there.

What about refwatcher if we initialize in debug application? Should we move LeakCanary.install() to debug as well

Was this page helpful?
0 / 5 - 0 ratings