buildscript { repositories { jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.1.4' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() maven { url 'https://maven.google.com/' name 'Google' } maven { url "https://jitpack.io" } } }
将jcenter修改为:
1. 修改为阿里云: maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
2. 修改为:repositories { jcenter(){ url 'http://jcenter.bintray.com/'} }