Deepin下Android Studio出现Received close

    技术2026-03-03  9

    错误

    在deepin中第一次编译Android项目时出现:

    javax.net.ssl.SSLException:Received close_notify during handshake

    看得出是SSL连接问题。

    解决办法

    查阅资料大致有几种解决办法:

    关闭防火墙。但是deepin默认是没有防火墙,因此不推荐这种方法。选用第三方源。将项目的build.gradle文件中的jcenter()替换成: maven{ url'http://maven.aliyun.com/nexus/content/groups/public/' } maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'}

    即:

    buildscript { ext.kotlin_version = '1.3.72' repositories { google() // jcenter() maven{ url'http://maven.aliyun.com/nexus/content/groups/public/' } maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'} } dependencies { classpath 'com.android.tools.build:gradle:4.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } allprojects { repositories { google() // jcenter() maven{ url'http://maven.aliyun.com/nexus/content/groups/public/' } maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'} } }

    替换后点击Sync now,即可。

    Processed: 0.015, SQL: 9