In your buildscript
block you have to add the repositories
also.
Something like:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
}
}
It is probably 2 years too late, but for me the solution was adding
allprojects {
repositories {
jcenter()
google()
}
at the end of build.gradle
file with buildscript
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.