Android Studio 3.5.3创建Kotlin新项目报错:Received close_notify during handshake
Hey there! That handshake error usually isn't directly caused by Android Studio 3.5.3 itself—it's almost always tied to network hiccups when trying to download dependencies (like Gradle, Kotlin plugins, or library artifacts) during project setup. Let's walk through some tried-and-true fixes:
Common Fixes to Try
Check your proxy or VPN settings
A misconfigured proxy or active VPN is one of the top culprits here. Head toFile > Settings > Appearance & Behavior > System Settings > HTTP Proxyand try switching to No proxy temporarily. If you need a proxy for your network, double-check the host, port, and authentication details are correct. Apply changes and restart Android Studio.Clear your Gradle cache
Corrupted cache files can break dependency downloads. Navigate to your user directory and delete the.gradlefolder:- Windows:
C:\Users\<YourUsername>\.gradle - Mac/Linux:
~/.gradle
After deleting, restart Android Studio and let it re-download all necessary files from scratch.
- Windows:
Verify Gradle and Kotlin version compatibility
Android Studio 3.5.3 works best with specific Kotlin plugin versions (around 1.3.50). Open your project's rootbuild.gradlefile and ensure the Kotlin classpath uses a compatible version:buildscript { ext.kotlin_version = '1.3.50' dependencies { classpath "com.android.tools.build:gradle:3.5.3" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } }Sync your project after making this tweak.
Switch to domestic Maven mirrors
If you're in a region with limited access to Maven Central or Google's repositories, replacing them with a mirror (like Alibaba's) can fix download timeouts. Update your rootbuild.gradlerepositories block:allprojects { repositories { maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/jcenter' } mavenCentral() } }Use Android Studio's embedded JDK
Custom JDK installations sometimes trigger SSL handshake issues. Go toFile > Project Structure > SDK Locationand check the box for Use embedded JDK (recommended). Restart your project afterward.
Wrapping Up
More often than not, this error is a network or caching issue rather than a bug in Android Studio 3.5.3. Try these steps one by one, and you should be able to get your Kotlin project up and running smoothly.
内容的提问来源于stack exchange,提问作者Aditya Vyas-Lakhan

