网上说了一堆要修改gradle.properties文件,注释掉后四行,如果没有这个文件呢?如果没有设置代理呢?你可以常识一下方法
buildscript {
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven { url 'https://maven.aliyun.com/repository/google' }
//jcenter()
//google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
//google()
//jcenter()
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven { url 'https://maven.aliyun.com/repository/google' }
}
}
注:gradle是你原本的版本就可以