Errorjava Compilation failed internal java compiler error [How to Solve]

Solution:
1. Check the JDK of project(Ctrl+Alt+shift+S)
File ->Project Structure->Project Settings ->Project

2. Check the JDK of project(Ctrl+Alt+shift+S)
File ->Project Structure->Project Settings -> Modules -> (the name you need to modify) -> Sources ->

3. Check the configuration of Java
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: