As配置阿里镜像,实测可用,真香~
在开发中,涉及到很多资源下载。所以一般都需要外面的资源
有时候又下载不了。所以需要配置一下镜像地址
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
以下是我project下的build.gradle的配置
// Top-level build file where you can add configuration options common to all sub-projects/modules. apply from: "dependencies.gradle" buildscript { repositories { maven { url "http://maven.aliyun.com/nexus/content/groups/public/" } google() jcenter() } dependencies { classpath com.android.tools.build:gradle:3.5.2 classpath com.jakewharton:butterknife-gradle-plugin:10.2.1 // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { maven { url "http://maven.aliyun.com/nexus/content/groups/public/" } google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }