1 构建项目无法下载metadata:
使用国内镜像
mavenCentral镜像仓库地址:
http://maven.aliyun.com/nexus/content/groups/public/
jentral镜像仓库地址:
http://maven.aliyun.com/nexus/content/repositories/jcenter
google镜像仓库地址:
http://maven.aliyun.com/nexus/content/repositories/google
修改build.gradle文件如下
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
allprojects {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
}