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.