Search code examples
androidxdebugleakcanary

I am getting the following error while executing my code : com.squareup.leakcanary:leakcanary-android:1.5


I am getting the following error while executing my code.

Error: Could not find method debugdcompile() for arguments [com.squareup.leakcanary:leakcanary-android:1.5] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.


Solution

  • in app.gradle

    debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
    

    Add mavenCentral() along with jcenter and to allprojects section in build.gradle .

    That May Help in fixing the Issue.