android studio 解决gradle加载依赖慢的问题

在更目录的 build.gradle 下添加两行配置

buildscript {
    
    repositories {
        google()
        maven{
            url 'http://maven.aliyun.com/nexus/content/groups/public/'
        }
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        maven{
            url 'http://maven.aliyun.com/nexus/content/groups/public/'
        }
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

猜你喜欢

转载自blog.csdn.net/y1361408906/article/details/91404071