Gradle DSL method not found: ‘implementation()’

ERROR: Gradle DSL method not found: ‘testImplementation()’
Possible causes:
The project ‘Rocket Web’ may be using a version of the Android Gradle plug-in that does not contain the method (e.g. ‘testCompile’ was added in 1.1.0).
Upgrade plugin to version 3.4.1 and sync project

Solution:

To use the DSL implementation() you have to use:

  • The updated gradle plugin for Android 3.0.0
  • The gradle version 3.4 or later

Then in your build.gradle you have to use:

buildscript {
    repositories {
        ...
        // You need to add the following repository to download the
        // new plugin.
        google()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0-beta1'
    }
}

In your gradle-wrapper.properties

distributionUrl=\
  https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip

2 thoughts on “Gradle DSL method not found: ‘implementation()’

Leave a Reply