Gradle DSL method not found: ‘implementation()’

I had such a simple reason for this not working that I must post my answer to prevent anybody else going through this.

Don’t put repositories and dependencies in the file called build.gradle (Project: YourProjectName)! There is a comment in that file that says:

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files

Good job to whoever put that note in there. Instead, place your repositories and dependencies in the similarly named module file build.gradle (Module: app).

There should already be a dependencies function. You may need to add repositories function. In my case, it was:

repositories {
    maven { url "https://jitpack.io" }
}

This should let you sync and recognize implementation.

Leave a Comment