Project compilation error:
Error: java: invalid source release: 16
The reason lies in the error caused by the inconsistency between the target bytecode version of the module and the actual compiler version.
To change all jdk versions to the same, first press the shortcut key Ctrl+Shift+Alt+S:
After the project sdk is changed, the sdk of the module is also changed to the same:
Finally, if the error is the same and the jdk version is the same, but the problem still cannot be solved, please read Solve Intellij idea Error: java: invalid source release: 1.8 and modify the pom.xml file as needed.