美文网首页
Connect to maven.google.com:443

Connect to maven.google.com:443

作者: DD_Dog | 来源:发表于2022-04-08 10:07 被阅读0次

    开发中经常遇到这个问题,由其是在最近google很多网站无法访问,打开一些工程时遇到Connect to maven.google.com:443 [maven.google.com/172.217.163.46] failed: connect timed out
    解决思路就是换一个服务器,阿里云搭建了相同的maven仓库,替换一下地址就行了:
    修改前

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    buildscript {
        repositories {
    //      google()
            maven { url 'https://maven.google.com' }
                    jcenter()
            
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.4'
        }
    }
    
    allprojects {
        repositories {
    //      google()
            maven { url 'https://maven.google.com' }
            jcenter()
            maven { url 'http://raw.github.com/saki4510t/libcommon/master/repository/' }
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    

    修改后

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    buildscript {
        repositories {
    //      google()
    //      maven { url 'https://maven.google.com' }
            jcenter()
            maven {
                url 'https://maven.aliyun.com/repository/google'
                name 'Google'
            }
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.4'
        }
    }
    
    allprojects {
        repositories {
    //      google()
    //      maven { url 'https://maven.google.com' }
            jcenter()
    //      maven { url 'http://raw.github.com/saki4510t/libcommon/master/repository/' }
            maven {
                url 'https://maven.aliyun.com/repository/google'
                name 'Google'
            }
        }
    }
    

    相关文章

      网友评论

          本文标题:Connect to maven.google.com:443

          本文链接:https://www.haomeiwen.com/subject/jdzesrtx.html