当使用Scala.js 0.6.20(addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.20")
中的project/plugins.sbt
)时,尝试使用sbt 0.13.15进行sbt导入项目时发生以下错误:
java.lang.NoSuchMethodError: sbt.package$.Zero()Lsbt/Global$;
at org.scalajs.sbtplugin.ScalaJSPluginInternal$.org$scalajs$sbtplugin$ScalaJSPluginInternal$$scalaJSStageSettings(ScalaJSPluginInternal.scala:254)
at org.scalajs.sbtplugin.ScalaJSPluginInternal$$anonfun$22.apply(ScalaJSPluginInternal.scala:446)
at org.scalajs.sbtplugin.ScalaJSPluginInternal$$anonfun$22.apply(ScalaJSPluginInternal.scala:446)
at scala.Function2$$anonfun$tupled$1.apply(Function2.scala:54)
at scala.Function2$$anonfun$tupled$1.apply(Function2.scala:53)
类似的问题:https://gitter.im/scala-js/scala-js?at=59b53890b59d55b823db1dcd
最佳答案
作为release notes mention,Scala.js 0.6.20要求sbt 0.13.16或更高。为此,应将project/build.properties
文件修改为:
sbt.version=0.13.16
(或兼容的东西)
关于sbt - java.lang.NoSuchMethodError : sbt. package $ .Zero()Lsbt/Global $;,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/46206462/