In IntelliJ, I\'m getting this strange error message when I try to build from the build menu
Error: java: release version 10 not supported
The most upvoted answer really helped me. However, for me the problem wasn't the Project bytecode version. Instead, my Maven module was marked with Target bytecode version 1.5, see picture below.
Just clicking the row and removing it fixed the problem: