IDEA中编写Scala程序报错scalac:jvm-1.8
在Intellij IDEA中编写Scala程序报错:Error:scalac: ‘jvm-1.8’ is not a valid choice for ‘-target’。
Intellij IDEA版本是2019.1.3,
JDK版本是1.8.0,
Scala版本是2.10.5.
解决方法:根据以下路径File->Settings -> Build, Execution, Deployment -> Compiler -> Scala Compiler打开对应页面,点击模块列表,将Additional compiler options中的-target:jvm-1.8修改为-target:jvm-1.7,然后apply即可。
在Intellij IDEA中编写Scala程序报错:Error:scalac: ‘jvm-1.8’ is not a valid choice for ‘-target’。
Intellij IDEA版本是2019.1.3,
JDK版本是1.8.0,
Scala版本是2.10.5.
解决方法:根据以下路径File->Settings -> Build, Execution, Deployment -> Compiler -> Scala Compiler打开对应页面,点击模块列表,将Additional compiler options中的-target:jvm-1.8修改为-target:jvm-1.7,然后apply即可。