IntelliJ IDEA告诉我“错误:java:编译失败:内部java编译器错误的想法”

2022-08-31 09:44:16

当我使用IntelliJ IDEA编译Java项目时,它给了我以下输出(和错误):

Information:Eclipse compiler 4.6.2 was used to compile java sources
Information:Module "sinoWeb" was fully rebuilt due to project configuration/dependencies changes
Information:2017/3/23 11:44 - Compilation completed with 1 error and 0 warnings in 5m 32s 949ms
Error:java: Compilation failed: internal java compiler error

我对此感到困惑!以下是我的设置:

enter image description

enter image description here


答案 1
  1. Intellij IDEA 上 按 Ctrl + Alt + S 打开设置。
  2. 构建、执行、部署 -> 编译器 -> Java 编译器
  3. 项目字节码版本中选择您的 Java 版本
  4. 取消选中尽可能使用模块目标 JDK 中的编译器
  5. 单击应用并确定。

答案 2

我通过在IntelliJ的编译器设置上增加构建进程堆大小的默认值(700)来解决此问题。

enter image description here


推荐