Android Studio jcenter下载太慢

今天新建一个Android 工程,jcenter下载实在太慢了,把build.gradle改一下,切换一下源。

// Top-level build file where you can add configuration options common to all sub-projects/modules.

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:3.0.0'

        // 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/' }

        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }

    }

}

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

你可能感兴趣的:(Android Studio jcenter下载太慢)