Error:SSL peer shut down incorrectly In Android st

2020-05-25 08:57发布

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

9条回答
聊天终结者
2楼-- · 2020-05-25 09:07

My problem was solved Clean Project and then `Rebuild Project.. Hope this helps you,,

查看更多
▲ chillily
3楼-- · 2020-05-25 09:09

after testing other answers and nothing happened, I try a trick open another project that is synced successfully, find gradle version and gradle plugin version and use those in current project

project structure menu button just copy gradle version and gradle plugin version and use them in other project and sync

enter image description here

查看更多
小情绪 Triste *
4楼-- · 2020-05-25 09:12

You have a slow Internet Connection & Your Android Studio Build got interrupted. Try to build in offline mode or fix your internet

查看更多
该账号已被封号
5楼-- · 2020-05-25 09:14

Files -> Invalidate cashes / restart -> Invalidate and Restart.

This will solve the problem.

查看更多
疯言疯语
6楼-- · 2020-05-25 09:15

I don't know if it has to do, but I removed the VCS and resynced, it took a lot of time, then I clicked on the syncing process and I resumed something that was paused. Then it worked.

查看更多
我命由我不由天
7楼-- · 2020-05-25 09:20

It's probably a certificate problem, I had similar issue with Android Studio and I solved it by following these 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 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
查看更多
登录 后发表回答