Android Studio 4.0 设置代理proxy和maven
程序员文章站
2022-04-01 13:02:47
系统 Windows 10Android Studio 4.0.11.设置proxy,能够使得下载SDK,NDK等速度变快。File->Settings 然后可以看到下面页面下面这张图修改的是局部,全局文件位置为C:\Users\UserName\.gradle\gradle.properties2.设置maven能使项目build时安装依赖项的速度提高build.gradle(Project:XXXXXX)// Top-level build file whe...
系统 Windows 10
Android Studio 4.0.1
1.设置proxy,能够使得下载SDK,NDK等速度变快。File->Settings 然后可以看到下面页面
下面这张图修改的是局部,全局文件位置为
C:\Users\UserName\.gradle\gradle.properties
2.设置maven能使项目build时安装依赖项的速度提高
build.gradle(Project:XXXXXX)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.3.72"
repositories {
maven{
url "https://maven.aliyun.com/groups/public"
}
maven {
url "https://maven.aliyun.com/repository/google"
}
maven {
url "https://maven.aliyun.com/repository/jcenter"
}
// google()
// jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven{
url "https://maven.aliyun.com/groups/public"
}
maven {
url "https://maven.aliyun.com/repository/google"
}
maven {
url "https://maven.aliyun.com/repository/jcenter"
}
// google()
// jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
参考文献:
1.Android Studio设置http proxy加速下载(亲测有效)
本文地址:https://blog.csdn.net/qq_24815615/article/details/107580938