0


IDEA download sources 报Cannot reconnect错误解决方法

IDEA download sources 报Cannot reconnect错误解决方法

我们在IDEA中下载依赖包的.java源码的时候经常会遇到两种报错:

1、

java.lang.RuntimeException: Cannot reconnect.

2、

Sources not found

今天为大家整理了一下常见的解决方法。
对这些类似的报错,我们通过如下操作和配置之后,基本都能解决。

1、清空本地maven仓库,刷新项目重新下载maven相关jar包。
在这里插入图片描述

2、Settings/Preferences -> Build, Execution, Deployment -> Build Tools -> Maven -> Importing,把下图选项勾上。
在这里插入图片描述
3、Settings/Preferences -> Build, Execution, Deployment -> Build Tools -> Maven,把Local repository后面的@Override选项勾上。
在这里插入图片描述
4、在idea的terminal窗口执行如下命令:

mvn dependency:resolve -Dclassifier=sources

,看到BUILD SUCCESS则执行成功。

mvn dependency:resolve -Dclassifier=sources

结果:
在这里插入图片描述
5、经过以上配置,如果还不行,可以尝试删掉项目中的.idea文件夹,重新构建一下项目再试试。

标签: intellij-idea

本文转载自: https://blog.csdn.net/weixin_44768683/article/details/125554325
版权归原作者 LouisMin23 所有, 如有侵权,请联系我们删除。

“IDEA download sources 报Cannot reconnect错误解决方法”的评论:

还没有评论