0
点赞
收藏
分享

微信扫一扫

android studio ERROR: SSL peer shut down incorrectly问题


异常:
新创建项目时出现此错误!
原因:
一般是因为墙的原因导致的。
解决:
通过配置国内的镜像仓库来解决这个问题。
配置的方法在根build.gradle中添加镜像仓库,如配置阿里镜像仓库: http://maven.aliyun.com/nexus/content/groups/public/

buildscript {

repositories {
google()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}

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

task clean(type: Delete) {
delete rootProject.buildDir
}

将jcenter放到最后一个,因为它下载速度很慢,很容易就超时了。
谢谢阅读


举报

相关推荐

0 条评论