问题 — AndroidStudio SSL peer shut down incorrectly

问题

AndroidStudio 编译项目时提示 SSL peer shut down incorrectly ,一般是因为资源被墙导致的,可以通过 fan qiang 或者 配置镜像 来解决这个问题。

方案

在项目的根 build.gradle 中添加镜像仓库,如下所示:

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        // 添加配置
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        jcenter()
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        // 添加配置
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        jcenter()
    }
}

你可能感兴趣的:(Android)