在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
答案 0 :(得分:1)
尝试
assemblyOption in set: = (assemblyOption in set) .value.copy (includeScala = true)
来源:https://github.com/sbt/sbt-assembly
如果这不能解决问题,则可能是与您已安装的插件的兼容性问题,这意味着您必须删除%HOME%中的插件目录。和%HOME%.ivy2,因为它在本地缓存了一些工件。
如果找不到插件,请尝试删除%HOME%.ivy2并再次运行控制台,因为它将删除缓存的工件。
希望对您有帮助。
答案 1 :(得分:0)
您可以尝试在您的sbt版本中更新scala版本吗? 例如,
scalaVersion := "2.13.0"