1、Check the jdk of the project(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 -> (name of the project to be modified) -> 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 and restart IDEA
File->Invalidate Caches/Restart
Similar Posts:
- [Solved] IDEA Compile Error: java: Compilation failed: internal java compiler error
- [Solved] Error:java: Compilation failed: internal java compiler error
- IDEA Error: Cannot resolve symbol “xxx“ [How to Solve]
- [Solved] IDEA Startup Error: Cound not Find or Load the main class
- [Solved] Project Start Slowly: “Build completed with 1 error and 18 warnings in 3 m 51 s”
- [Solved] IDEA Warning: Information:javac 1.8.0_251 was used to compile java sources
- IDEA Error: java: Invalid source release: 11 error [How to Solve]
- IntelliJ idea error: (24, 35) Java: constant string too long
- Error:java: javacTask: source release 8 requires target release 1.8
- unused import statement