LocationAwareException: A problem occurred configuring root project

上星期项目还没事,这周一打开项目就报Read timeOut

Caused by: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'xxx'

解决方法:
首先打开你的build.gradle
在这里插入图片描述
在这里插入图片描述
然后将repositories的这两个文件夹修改成以下的内容:

    repositories {
        // maven库
        def cn = "http://maven.aliyun.com/nexus/content/groups/public/"
        def abroad = "http://central.maven.org/maven2/"
        // 先从url中下载jar若没有找到,则在artifactUrls中寻找
        maven {
            url cn
            artifactUrls abroad
        }
        maven { url "http://maven.aliyun.com/nexus/content/repositories/jcenter"}
        google()
    }

完成以上操作就可以编译成功了
亲测有效,希望对你有用吧

发布了43 篇原创文章 · 获赞 60 · 访问量 6739

猜你喜欢

转载自blog.csdn.net/yuhang01/article/details/103761786