IDEA启动Scala程序报错:Error:scalac: ‘jvm-11’ is not a valid choice for ‘-target’和scalac: bad option: ‘-target:jvm-11’,如下图所示:
- 项目的根目录下找到.idea文件夹
- 找到文件夹中scala_compiler.xml文件
- 注释掉其中的
- 最后重启IDEA即可

IDEA启动Scala程序报错:Error:scalac: ‘jvm-11’ is not a valid choice for ‘-target’和scalac: bad option: ‘-target:jvm-11’,如下图所示: