在我解决Could not find com.android.tools.build:gradle:3.0.1这个问题,也就是刚刚写的博客之后,又出现了个Could not find com.android.tools.build:gradle:3.0.1的问题,其实解决方法也很简单,如下:
// Top-level build
file where you can
add configuration options common
to all sub-projects/modules.
buildscript {
repositories {
google(
jcenter()
}
dependencies {
classpath
'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
google(
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
在中文注释处添加google()即可,但请注意:google()必须在最上方。