implementation() replaced the compile() configuration, which will be DEPRECATED by the end of 2018.
To fix errors and use them, you need to upgrade to Android Gradle Plugin 3.0.0 (or higher). As a result of this update, you also need to upgrade Gradle to Gradle 4.1 (or higher). You also need to use Build Tools 26.0.2 (or higher), that is, update your buildToolsVersion in your build.gradle or just completely remove it from there (since, starting from 3.0.0, the minimum required version is used by default), you also You must update Android Studio 3 (or higher) to use these advanced versions.
You can read about the Android 3.0 plugin changelog, improved compilation time, and much more here: https://developer.android.com/studio/releases/gradle-plugin#3-0-0
So how do you update Android Gradle Plugin and Gradle?
OPTION 1: Manually
In your build.gradle find your path to the Gradle class and upgrade to Gradle 3.0. You should also add the google () maven repository:
buildscript { repositories { jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0' } }
In gradle-wrapper.properties find your distribution Url and upgrade it to:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
OPTION 2: through the project properties (but note that manual configuration will override it)
Go to File → Project Structure → Project

Lastly, you can also choose whether to replace compile () with implementation () or api (). By default, I would suggest using only the implementation (). You can read more about the differences here: https://developer.android.com/studio/build/dependencies
source share