apply plugin: ‘com.android.application‘ buildscript { repositories { maven{ url‘http://maven.aliyun.com/nexus/content/groups/public/‘ } maven{ url‘http://maven.aliyun.com/nexus/content/repositories/jcenter‘} google() } dependencies { classpath ‘com.android.tools.build:gradle:4.0.0‘ } } repositories { //jcenter() //把这里注释掉,换成阿里的源 maven{ url‘http://maven.aliyun.com/nexus/content/groups/public/‘ } maven{ url‘http://maven.aliyun.com/nexus/content/repositories/jcenter‘} }
buildscript{ repositories{ //jcenter() //把这里注释掉,换成阿里的源 maven{ url‘http://maven.aliyun.com/nexus/content/groups/public/‘ } maven{ url‘http://maven.aliyun.com/nexus/content/repositories/jcenter‘} google() } } allprojects{ repositories{ //jcenter() //把这里注释掉,换成阿里的源 maven{ url‘http://maven.aliyun.com/nexus/content/groups/public/‘ } maven{ url‘http://maven.aliyun.com/nexus/content/repositories/jcenter‘} } }