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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With