android studio 3.0 加载项目过慢---mave

作者: 君莫醉 | 来源:发表于2017-11-10 18:41 被阅读365次

今天用android studio 3.0打开项目时发现一直在谷歌的maven仓库加载


%E

卡到这不动了,看了下maven仓库的配置发现:

buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com'
            name 'Google'
        }
        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 {
        jcenter()
        maven {
            url 'https://maven.google.com'
            name 'Google'
        }
        google()
    }
}

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

maven仓库的路径居然是:https://maven.google.com
后来在网上找了个阿里云上面的maven地址,配置如下:

buildscript {
    repositories {
        jcenter()
        maven {
            url 'http://maven.aliyun.com/nexus/content/groups/public'
//            name 'Google'
        }
        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 {
        jcenter()
        maven {
            url 'http://maven.aliyun.com/nexus/content/groups/public'
//            name 'Google'
        }
        google()
    }
}

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

这之后就发现加载快多了

相关文章

网友评论

    本文标题:android studio 3.0 加载项目过慢---mave

    本文链接:https://www.haomeiwen.com/subject/boqimxtx.html