天天看點

Android Studio中gradle下載下傳慢如何解決

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

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        maven { url 'XXXXXXXXXX'}  //改成其他的下載下傳位址
        mavenLocal()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven { url 'XXXXXXXXXX'} //改成其他的下載下傳位址
        mavenLocal()
        jcenter()
    }
    tasks.withType(Javadoc).all { enabled = false }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}      
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=XXXXXXXXX
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists      

繼續閱讀