Gradle下载依赖速度优化:(阿里云镜像优化,通过修改项目的build.gradle下载源,使用国内阿里镜像来优化下载)
修改项目build.gradle
buildscript {
repositories {
//插入阿里云maven镜像
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
google()
jcenter()
}
}
allprojects {
repositories {
//插入阿里云maven镜像
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
google()
jcenter()
}
}
最终效果
JetBrains IDEA下载Plugin优化:(教育网开源镜像站,通过修改http代理,使用国内代理加速下载)
进入设置(File->Settings->Appearance & Behavior->System Settings->HTTP Proxy)
选中Auto-detect proxy settings
选中Automatic proxy configuration URL:
最终效果
最后要说的:
此教程只适合国内用户,海外用户是不需要这样操作的,如果你觉得本文写的不错,请给我点个赞。如果老板有钱,请给我点个赞赏。感谢点击本文