Square LeakCanary Cannot find symbol
Rebuilding the project fixed it for me.
There's a deleted answer (I don't know why) by Kaushik Gopal that gives this solution and points to a Github issue
I am honestly surprised that
dependencies { debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3' releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3' }
did not work for you, because it did for me.
Maybe you want to try it with your buildType instead of the productFlavour:
dependencies { someBuildTypeCompile 'com.squareup.leakcanary:leakcanary-android:1.3'}
Make sure you add the libraries to your
build.gradle
dependencies { debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1' releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'}
add
mavenCentral()
to your repositoriesbuildscript { repositories { jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' }}allprojects { repositories { jcenter() mavenCentral() }}