Connect to maven.google.com:443 [maven.google.com] failed: Connection timed out: connect

Connect to maven.google.com:443 [maven.google.com] failed: Connection timed out: connect,第1张

Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.
这是因为访问不到maven.google.com了,请把maven的url换成阿里仓

注意:上下两处url都要替换!

buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.aliyun.com/repository/google'
            name 'Google'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://maven.aliyun.com/repository/google'
            name 'Google'
        }
    }
}


https://developer.aliyun.com/mvn/search

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/992134.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存