intellij idea - Error: java: invalid source release 1.9
Select the project, then File > ProjectStructure > ProjectSettings > Modules -> sources You probably have the Language Level set at 9:
Just change it to 8 (or whatever you need) and you're set to go.
Also, check the same Language Level settings mentioned above, under Project Settings > Project
Sometimes the problem occurs because of the incorrect version of the project bytecode.
So verify it : File -> Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler -> Project bytecode version and set its value to 8
I have had the same problem. There is an answer:
- 1.CTRL + ALT + SHIFT + S;
- Then go to "Modules";
- "Dependencies;
- Change "Module SDK".
Got it! Now u have Java 9!
You should to set the JAVA SDK and appropriate language level in the project settings. Click to enlarge.