AndroidStudio Gradle下載速度慢解決方法
1 找到工程項目的build.gradle
2 注釋掉 jcenter() 剂跟,改用國內(nèi)阿里云的maven庫地址
這里注意,只需要分別修改 buildscript 和 allprojects 的 repositories 即可
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
//google()
//jcenter()
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}
allprojects {
repositories {
// google()
// jcenter()
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
找到fluttersdk目錄,進入如下目錄Flutter? ? ?packages? ? ?flutter_tools? ? ?gradle?找到下 flutter.gradle文件
buildscript {
repositories {
//google()
//jcenter()
maven{ url 'https://maven.aliyun.com/repository/jcenter'}
maven{url 'http://maven.aliyun.com/nexus/content/groups/public'}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}
作者:KT_11
鏈接:http://www.reibang.com/p/338860fc4921
來源:簡書
簡書著作權(quán)歸作者所有,任何形式的轉(zhuǎn)載都請聯(lián)系作者獲得授權(quán)并注明出處。