buildscript { repositories { // 换成国内镜像 maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/jcenter' } maven { url 'https://maven.aliyun.com/repository/public' } google() mavenCentral() } // ... existing code ... } allprojects { repositories { // 换成国内镜像 maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/jcenter' } maven { url 'https://maven.aliyun.com/repository/public' } google() mavenCentral() } } // ... existing code ...