Tag Archives: IDEA Error

IDEA Error: java: Invalid source release: 11 error [How to Solve]

Today, I created a new springboot, and it failed when I started the project.

Error: java: invalid source release: 11 error

It may be that when creating springboot, you did not pay attention to directly selecting the 11 version. At this time, you need to modify the jdk version. Because the project has already started, I need to modify the java version of my project here.
The file—setting—build, execution, deployment—compiler—java compiler in the menu bar, I have 11

Change them to 8 and click apply because my version here is java 1.8

In addition, in some cases, you need to modify the configuration of the project settings (open the shortcut key ctrl+shift+alt+s), and then modify it to your own version if it is wrong:

 

 

 

 

The above is the solution to the Error:java: invalid source release: 11 error.

How to Solve IDEA Error: “Library source does not match the bytecode for class”

problem description

After jar package is updated, an error message is reported: “library source does not match the bytecode for class”

After checking, it is found that jar content is still the old version

The jar package management tool is gradle

solutions

1. Update jar package through gradle command, refresh dependencies: gradle clean dependencies — refresh dependencies, and then,

    

If not, use the next method

2.File–> Invalidate caches/restart to clean up compiler cache

    

If there is still no effect, please look at the next solution

3. Find the jar package local warehouse of gradle, delete all the downloaded jar package versions and download them again

local warehouse Path, first confirm whether you are using the gradle that comes with idea or your own

Go directly to the folder e: repo \. Gradle/caches/modules-2/files-2.1