Android Studio中添加阿里云Maven仓库镜像

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xuehuayous/article/details/84328980

不知道公司网最近怎么抽风了,加载依赖的速度奇慢无比,加入阿里云的镜像地址之后就顺畅了很多,其实也比较简单,这里记录下:

buildscript {
    ext.kotlin_version = '1.3.0'
    repositories {
        maven {
            url "http://maven.aliyun.com/nexus/content/groups/public/"
        }
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // 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()
    }
}

猜你喜欢

转载自blog.csdn.net/xuehuayous/article/details/84328980