[Solved] Error:java: Compilation failed: internal java compiler error 解决办法

Problem: Error:java: Compilation failed: internal java compiler error Solution
Solution: Inconsistent settings in the JDK development tools.
1, check the project jdk (Ctrl+Alt+shift+S)
File ->Project Structure->Project Settings ->Project

2、View the jdk of the project (Ctrl+Alt+shift+S)
File ->Project Structure->Project Settings -> Modules -> (need to modify the name of the project) -> Sources ->

3、View Java configuration in idea
File ->Setting ->Build,Execution,Deployment -> Compiler -> Java Compiler

If the above three steps still fail
Clear IDEA cache Restart IDEA

File->Invalidate Caches/Restart

Read More: