解决Android Studio Gradle Sync同步慢问题

发现阿里云有镜像,只需要添加相应的url地址就可以下载;打开项目build gradle文件。

buildscript {
    
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.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()
    }
}
posted @ 2019-09-16 17:10  Java-Legend  阅读(9135)  评论(0编辑  收藏  举报