Android Studio throwing "Exception in thread "main" javax.net.ssl.SSLException: Received fatal alert: protocol_version"

huangapple go评论85阅读模式
英文:

Android Studio throwing "Exception in thread "main" javax.net.ssl.SSLException: Received fatal alert: protocol_version"

问题

我今早刚格式化了我的系统,设置了所有的路径变量并完成了所有的设置,但仍然出现这个错误。

上次格式化时没有遇到这个问题,需要帮助。

"main"线程中的异常javax.net.ssl.SSLException:收到致命警报:protocol_version
在 sun.security.ssl.Alerts.getSSLException(未知源)。
在 sun.security.ssl.Alerts.getSSLException(未知源)。
在 sun.security.ssl.SSLSocketImpl.recvAlert(未知源)
在 sun.security.ssl.SSLSocketImpl.readRecord(未知源)
在 sun.security.ssl.SSLSocketImpl.performInitialHandshake(未知源)
在 sun.security.ssl.SSLSocketImpl.startHandshake(未知源)
在 sun.security.ssl.SSLSocketImpl.startHandshake(未知源)
在 sun.net.www.protocol.https.HttpsClient.afterConnect(未知源)
在 sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(未知源)
在 sun.net.www.protocol.http.HttpURLConnection.getInputStream(未知源)
在 sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(未知源)
在 org.gradle.wrapper.Download.downloadInternal(Download.java:58)
在 org.gradle.wrapper.Download.download(Download.java:44)
在 org.gradle.wrapper.Install$1.call(Install.java:61)
在 org.gradle.wrapper.Install$1.call(Install.java:48)
在 org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
在 org.gradle.wrapper.Install.createDist(Install.java:48)
在 org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
在 org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
异常:Gradle 任务 assembleDebug 失败,退出码为 1

英文:

I had formatted my system this morning only , after setting up all the path variables and completing all the setting still getting this error .

Did not had this issue when i last formated , need help.

Exception in thread "main" javax.net.ssl.SSLException: Received fatal alert: protocol_version
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.wrapper.Install$1.call(Install.java:61)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

Exception: Gradle task assembleDebug failed with exit code 1

答案1

得分: 3

这个问题已经解决。

首先,我将我的JDK从7版本更新到8版本。
你也可以从这里下载:https://www.techspot.com/downloads/5198-java-jre.html

然后,修改系统环境变量中的JAVA_HOME路径。

之后,我建议进行一次冷启动,然后再次启动,这次Android Studio会抛出许可证未被接受的错误。

打开命令提示符,运行flutter doctor

它会显示出确切的问题,只需要接受所有的许可证。

之后,一切都会正常进行。

英文:

This issue is resoleved.

firstly I updated my jdk from version 7 to 8
you can also download that form here https://www.techspot.com/downloads/5198-java-jre.html

then afterwards change the JAVA_HOME path in your system environment variables .

Afterwards i would suggest a cold shut-down and starting again this time Android studio will throw error saying license not accepted.

Open command prompt and run flutter doctor.

It will show you the exact issue and just accept all the licenses.

After that you are good to go.

huangapple
  • 本文由 发表于 2020年10月16日 22:56:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/64391576.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定