斯卡拉“;控制台“;命令给出错误“;缺少scala library.jar“;

斯卡拉“;控制台“;命令给出错误“;缺少scala library.jar“;,scala,sbt,Scala,Sbt,在sbt下,如果我给出“console”来启动REPL shell,我会得到以下错误 [error] stack trace is suppressed; run 'last scalaInstance' for the full output [error] (scalaInstance) Missing scala-library.jar [error] Total time: 1 s, completed Oct 7, 2019 12:45:07 PM $ sbt scalaVersio

在sbt下,如果我给出“console”来启动REPL shell,我会得到以下错误

[error] stack trace is suppressed; run 'last scalaInstance' for the full output
[error] (scalaInstance) Missing scala-library.jar
[error] Total time: 1 s, completed Oct 7, 2019 12:45:07 PM

$ sbt scalaVersion
[info] Loading global plugins from C:..\plugins
[info] Loading settings for project test from plugins.sbt ...
[info] Loading project definition from C:xx\test\project
[info] Loading settings for project root from build.sbt ...
[info] scalaVersion
[info]  2.11.12

$ sbt sbtVersion
[info] sbtVersion
[info]  1.3.0

您可以尝试在sbt构建中更新scala版本吗? 比如说,

scalaVersion:=“2.13.0”
试试看
assemblyOption在集合中:=(集合中的assemblyOption).value.copy(includeScala=true)

资料来源:

如果这不能解决问题,则可能是与您可能已安装的插件的兼容性问题,这意味着您必须删除%HOME%中的插件目录。和%HOME%.ivy2,因为它在本地缓存一些工件

如果找不到插件,请尝试删除%HOME%.ivy2并再次运行控制台,因为它将删除缓存的工件

你可能想推荐


我希望它能有所帮助。

你使用哪个
sbt
版本?你能做一个
sbt清理
sbt重新加载
sbt更新吗?@ElBaulP我试过了。sbt更新后,当我尝试“console”时,我得到了相同的丢失scala-library.jar错误。@Suma:我使用1.3.0。是否将ManagedScalInstance设置为false?