错误:SSL 对等方在 Android Studio 3.0.1 中错误关闭 [英] Error:SSL peer shut down incorrectly In Android studio 3.0.1

查看:32
本文介绍了错误:SSL 对等方在 Android Studio 3.0.1 中错误关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我构建项目时,我收到以下错误错误:SSL 对等方关闭不正确,请告诉我如何解决此错误

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

推荐答案

这可能是证书问题,我在 Android Studio 中遇到了类似的问题,我按照以下步骤解决了:

It's probably a certificate problem, I had similar issue with Android Studio and I solved it by following these steps:

1 - 打开 gradle-wrapper-properties 文件并将 https:// 修改为 http://

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

2 - 在 Android SDK 管理器中强制使用 http 而不是 https,只需在 Android Studio 工具栏上点击上面的 SDK 管理器图标然后去到 SDK 更新站点 标签.

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 - 转至 文件 -> 设置.在 IDE 设置部分选择服务器证书,然后选中自动接受不受信任的证书.如果问题仍然存在,那么您应该将证书添加到 Android Studio,例如 *.google.com 证书.就我而言,我尝试添加多个证书,但在打开 之后仍然出现 SSL 错误://services.gradle.org 在我的浏览器中,我将证书导入到 Android Studio,无论如何将其添加为 SSL 异常解决了我的问题.

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.

如果问题依旧,我建议配置一个代理安装所需的依赖项.打开 Gradle 属性代理设置并添加以下内容:

If the problem persist, I recommend to 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

这篇关于错误:SSL 对等方在 Android Studio 3.0.1 中错误关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆