Solution: Do the following operations in the project's builde.gradle and add google() respectively
buildscript {
repositories {
google()
....
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
.....
}
}