怎样处理Gradle中的这个文件下载慢的问题的?

gradle版本下载:app

https://services.gradle.org/distributions/maven

一,使用阿里云的国内镜像仓库地址,就能够快速的下载须要的文件gradle

修改项目根目录下的文件 build.gradle :ui

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

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

而后选择从新构建项目就能够了阿里云

二,url

找到项目目录gradle\wrapper\gradle-wrapper.properties这个文件code

你会看到ip

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://http://services.gradle.org/distributions/gradle-2.8-all.zip
get

而后找到 gradle-2.8-all.zip 这就是你要下载的版本,去某度搜一个下载下来it

而后找到 C:\Users\XXXX\.gradle\wrapper\dists下面会有一个文件夹,拷贝进去,搞定。

关闭项目,从新打开完美!

相关文章
相关标签/搜索