Android Studio 2020新版本 卡在Gradle downloadingsync failed下载缓慢 下载超时 亲测有效解决办法

这个问题卡了我三天头都疼了!最终解决方法新建一个项目,然后改两个文件build.gradle里面改成这个:buildscript {repositories {mav

这个问题卡了我三天

头都疼了!

最终解决方法

新建一个项目,然后改两个文件

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镜像解决好吧!

发布者:admin,转转请注明出处:http://www.yc00.com/web/1754940109a5217995.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信