idea问题汇总

本文介绍了在使用IntelliJ IDEA进行项目编译和打包过程中遇到的一些常见问题及解决方案,包括处理编译错误、配置IDEA设置、解决依赖问题等。

编译github源码报错

错误信息:Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.
解决:mvn clean install -DskipTests -Denforcer.skip=true

idea行号之间有空行

解决:File/Settings/Editor/Inlay Hints/取消code version

导入的jar包消失,编译报无法找到包

解决:File/Settings/Build, Execution, Deployment/Build Tools/Maven/Runner 取消Delegate IDE build/run actions to Maven
删除target、重新加载maven xml

idea控制台下编译打包

报错信息:Registry key ‘Software\JavaSoft\Java Runtime Environment\CurrentVersion’
has value ‘1.8’, but ‘1.7’ is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.
解决: File/Settings/Tools/Terminal/Application Settings/shell path: 把powershell 改为C:\WINDOWS\system32\cmd.exe

IDEA Error: java: Cannot find JDK ‘1.8’ for module

如果项目配置了jdk,本地也配置了JAVA_HOME,但是本地安装过不同版本的IDEA
解决:假如你的idea安装在D:/dev/ideaIU-2024.3.7
那么修改D:/dev/ideaIU-2024.3.7/bin/idea.properties 文件
添加下面配置:
idea.config.path=D:/dev/ideaIU-2024.3.7/config
idea.system.path=D:/dev/ideaIU-2024.3.7/system
idea.plugins.path=D:/dev/ideaIU-2024.3.7/plugins

重启idea,问题解决

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值