Class file has wrong version 52.0, should be 50.0
Select "File" -> "Project Structure".
Under "Project Settings" select "Project"
From there you can select the "Project SDK".
It means your Java runtime version is 1.6, but your compiler version (javac) is 1.8. To simply solve it, just advance your JVM version to 1.8.
But if you don't want to change the Java runtime version, then do the following steps:
JAVA_HOME= "your jdk v1.8 folder path"
, to make sure jdk is also v1.8 and usejava -version
andjavac -version
again to ensure it- Make sure IntelliJ's compiler mode is set to compliant with v1.6 But i have tried that. it didn't solve my problem.