leakcanary: Library leakcanary-android-1.3 is not in list of external libraries

I have a project with lots of dependencies. When I add

 dependencies {
   debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3'
   releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3'
 }

to main build.gradle, leakcanary-android is not in list of external libraries after gradle sync, although leakcanary-analyzer and leakcanary-watcher are there. See screenshot: screen shot 2015-05-09 at 18 59 23

On a blank project however everything works fine: screen shot 2015-05-09 at 18 59 09

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 40 (9 by maintainers)

Commits related to this issue

Most upvoted comments

In my case, I had a custom buildType

buildTypes {
    bypass {
       // Some parameters
    }
}

I just had to use bypassCompile instead of debugCompile

I just encountered the same issue. Finally I solved it by adding

repositories {
    mavenCentral()
}

Before the dependencies { ... } section of my build.gradle.