admin管理员组文章数量:1130349
这个问题卡了我三天
头都疼了!
最终解决方法
新建一个项目,然后改两个文件
build.gradle里面改成这个:
buildscript {
repositories {
maven {
url "http://maven.aliyun/nexus/content/groups/public/"
}
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
url "http://maven.aliyun/nexus/content/groups/public/"
}
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradle版本我选择4.1.1 上下两个文件里面的gradle版本要统一。
gradle-wrapper.properties这样改
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle/distributions/gradle-4.1.1-all.zip
三分钟下完加载完并且没有报错,阿里云牛!!!!!
以后凡是和Marven、Gradle这两个玩意相关的bug和问题,我一律aliyun镜像解决好吧!
这个问题卡了我三天
头都疼了!
最终解决方法
新建一个项目,然后改两个文件
build.gradle里面改成这个:
buildscript {
repositories {
maven {
url "http://maven.aliyun/nexus/content/groups/public/"
}
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
url "http://maven.aliyun/nexus/content/groups/public/"
}
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradle版本我选择4.1.1 上下两个文件里面的gradle版本要统一。
gradle-wrapper.properties这样改
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle/distributions/gradle-4.1.1-all.zip
三分钟下完加载完并且没有报错,阿里云牛!!!!!
以后凡是和Marven、Gradle这两个玩意相关的bug和问题,我一律aliyun镜像解决好吧!
版权声明:本文标题:Android Studio 2020新版本 卡在Gradle downloadingsync failed下载缓慢 下载超时 亲测有效解决办法 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1754940109a2744141.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论