idea编译报错Compilation failed: internal java compiler error

1、修改编译器版本

也可能是项目过大,需要增大编译进程的堆大小:(我就是因为这原因导致的编译报错)

在setting-->Build,Execution,Deployment-->Compiler 中找到build process heap size(Mbytes):700改为1024。如图:

还需要注意pom文件,配置成1.7之后,每次maven刷新,编译器都会自动变成1.7的,导致莫名的编译错误。如图:

2、修改项目jdk版本

4、重新构建项目、清除缓存等操作

猜你喜欢

转载自blog.csdn.net/sumengnan/article/details/113565738