Change dependency declaration as follows
from
compile
to
implementation
Also check in our root gradle file contains jcenter and maven repo like as follows
buildscript {
repositories {
maven {
url 'http://artifactory.raksdtd.com/artifactory/libs-release'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
}
}
To synchronize all of the answers here and elsewhere:
> buildscript {
> repositories {
> google()
> jcenter()
> }
> dependencies {
> classpath 'com.android.tools.build:gradle:3.0.0'
>
> } }
Make your buildscript in build.gradle look like this. It finds all of them between google and jcenter. Only one of them will not find all of the dependencies as of this answer.