1、自己搭库。我准备在自己阿里云上添加资源库给自己。。
2、改如图
build过了
buildscript { repositories { // jcenter() 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 { // jcenter() repositories { // maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'} 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'} maven { url "https://jitpack.io" } } } } task clean(type: Delete) { delete rootProject.buildDir }编译过了。。不然别的有些下载不下来