在IntelliJ IDEA 运行 scala 报错 scala/Function1

在IntelliJ IDEA 运行 scala 报错 scala/Function1

在IntelliJ IDEA 中运行scala程序有时候会报错 scala/Function1在IntelliJ IDEA 中运行scala程序有时候会报错 scala/Function1

image

解决方案

点击项目的下的 resources 文件夹
image
点击Modules
image
点击 Dependcncies
image
点击 + 号,选择Library
image
选择scala—sdk-**** , 点击Add Selected即可
image
在下面列表中发现有此即可
image
然后重新运行项目即可运行成功
image

posted @ 2022-10-24 11:55  QYGQH  阅读(63)  评论(0编辑  收藏  举报