SSL peer shut down incorrectly 问

2021-12-07  本文已影响0人  风度_dbfe

在AS编译时有时会出现SSL peer shut down incorrectly的问题或者因为外网的原因一些依赖和jar包导入失败,这时候我们可以想前端的cnpm是一样配置国内镜像。

这里我们选择阿里的镜像:http://maven.aliyun.com/nexus/content/groups/public/

buildscript {

    repositories {
        maven { url 'https://jitpack.io' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        maven { url 'https://maven.aliyun.com/repository/central' }
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
        google()
        jcenter()
    }
    dependencies {
       .....
    }
}

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        maven { url 'https://maven.aliyun.com/repository/central' }
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
        google()
        jcenter() // jecnter最好放在最后一个  ===速度慢===
    }
}
上一篇 下一篇

猜你喜欢

热点阅读