3

使用 scala 版本 2.11.5 试用 sbt 版本 0.13.7。两者都是目前最新的。他们一起工作吗?当我运行时sbt clean compile,它会打印:

[info] 'compiler-interface' not yet compiled for Scala 2.11.5. Compiling...
error: java.lang.NoClassDefFoundError: scala/tools/nsc/typechecker/Infer$Inferencer

当更改为 scala 2.11.4 时,一切正常:

[info] 'compiler-interface' not yet compiled for Scala 2.11.4. Compiling...
[info]   Compilation completed in 13.434 s

我找不到任何有关 sbt 和 scala 版本兼容性的相关资料。它可能与sbt build against scala 2.11 有关吗??

4

2 回答 2

11

您可以尝试删除本地缓存,根据我的经验,有时这处于不良状态:

rm -r ~/.sbt/boot/
rm -r ~/.ivy2/cache/org.scala-lang/
rm -r ~/.ivy2/cache/org.scala-sbt/
于 2015-01-21T14:00:23.383 回答
1

下面会更好

rm -rf ~/.sbt/boot/
rm -rf ~/.ivy2/cache/org.scala-lang/
rm -rf ~/.ivy2/cache/org.scala-sbt/

如果失败,请多次运行激活器。

于 2016-12-10T03:31:06.750 回答