Idea error: Java: compilation failed: internal java compiler error

Specific include:
View the JDK of the project (Ctrl+Alt+ Shift +S)
File -> Project Structure-> Project Settings -> Project
View the project’s JDK (Ctrl+Alt+ Shift +S)
File -> Project Structure-> Project Settings -> Modules -> (Name of project to be modified) ->; Sources
See the Java configuration in IDEA
File -> Setting -> Build,Execution,Deployment -> Compiler -> Java Compiler
Modify heap size
File -> Setting –> Build,Execution,Deployment–> Build Process Heap Size (mBytes):700 changed to 1024 or 8192

Read More: