Error: Java: Invalid Target Release: 11 - Intellij Idea

Error: Java: invalid target release: 11 - IntelliJ IDEA

I've got the same issue as stated by Gryu.
Same Intellij 2018 3.3

I was able to start my project by setting (like stated by Grigoriy)

File->Project Structure->Modules ->> Language level to 8 ( my maven project was set to 1.8 java)

AND

File -> Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler -> 8 also there

I hope it would be useful

Java 11 : Error:java: invalid source release: 11 - Not sure what to do anymore

Please check your JDK 11 Setup in IntelliJ! Even though the project SDK is called 11, it still says that your java-version is 1.8.161. Judging from this it looks like your new jdk 11 still points to your old 1.8 installation which does not now about version 11 yet.

Solving persistent invalid target release issue in IntelliJ IDEA

You have a typo in the options:

typo

Must be 1.8 instead of \1.8.

Error:java: invalid source release: 8 in Intellij. What does it mean?

I had the same issue when "downgrading" a project from Java 8 to Java 6. The reason was that it was not changed at all places in IntelliJ.

In IntelliJ 13.1.4 I had to change Java and SDK version on the following places not to get this error:

  • File -> Project Structure -> Project Settings
  • File ->
    Project Structure -> Module Settings -> Tab: Sources: Language Level
  • File -> Project
    Structure -> Module Settings -> Tab: Dependencies: Module SDK
  • File -> Settings -> Compiler -> Java Compiler -> Target bytecode
    version

screen shot of File > Project Structure > Project

screen shot of File > Project Structure > Modules > Sources

screen shot of File > Project Structure > Modules > Dependencies

screen shot of File > Settings/Preferences > Compiler > Java Compiler

The last bullet was the one that was not updated in my case. Once I changed this, the error disappeared.

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:

screenshot

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

enter image description here



Related Topics



Leave a reply



Submit