Error:SSL peer shut down incorrectly In Android studio 3.0.1

匿名 (未验证) 提交于 2019-12-03 00:53:01

问题:

When I build the project I receive the following error Error:SSL peer shut down incorrectly please let me know how to fix this error

回答1:

The problem is caused by some kind of incompatibility with HTTPS.

For solve this, in the Android SDK Manager, go to "Options" in the "Tools" menu, and check the option "Force https://... sources to be fetched using http://...".

Then try again to download the package.

OR

  • check out this link

hope this helps you.



回答2:

It's probably a problem of the certificate, I had similar issue with Android Studio and I solved by this steps :

1 - Open gradle-wrapper-properties file and modify https:// to http://

2 - Force using http instead of https in Android SDK Manager, just click on SDK Manager icon above on Android Studio Toolbar and go to SDK Update Sites tab.

3 - Go to File->Settings. In the IDE Settings section select Server Certificates, then check accept non-trusted certificates automatically. If the problem persist, then you should add the certificates to Android Studio, like *.google.com certificate. In my case I tried to add multiple certificates but I still get SSL Error, After I opened https://services.gradle.org in my browser and I imported the certificate to Android Studio, Anyhow adding this as an SSL exception resolved the issue for me.

If the problem persist, I recommend configure a proxy to just install the desirable dependencies. Open Gradle properties for proxy settings and add the following :

#systemProp.http.proxyHost=x #systemProp.https.proxyPort=y #systemProp.https.proxyHost=x #systemProp.http.proxyPort=y 


回答3:

Go to Android SDK manager and update with latest SDK. After downloading just re syncy and error will be gone



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!