Your project-level `build.gradle` file is requesting that `com.android.tools.build:gradle:3.0.1` be added to the classpath, but it does not have `google()` in the list of repositories.
You want that `buildscript` closure to look like:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
(notice the `google()` line)
I had the same problem, I tried [Manoj Prabhakar's solution][1] but I fixed adding the google() repository to the buildscript block in the project level build.gradle
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
[1]: https://stackoverflow.com/a/47459076/3172725