14 points · by ingve · 11y ago · 4 comments
If you look under "no-op dependency" you'll find a solution to the issue you're describing.
I've found it useful to have a leak canary specific build flavor or type, which only I ever see. For all other debug / production build leak canary is not initialized.