执行sbt时出错:java.lang.NoClassDefFoundError:sbt / State $ Next

我正在尝试运行sbt包来构建我的scala项目但是在从存储库下载jar之后它会让我跟随错误 -

java.lang.NoClassDefFoundError:sbt / State $ Next at sbt.xMain.run(Main.scala:28)at xsbt.boot.Launch $$ anonfun $ run $ 1.apply(Launch.scala:109)at xsbt.boot .Lsunch $ .withContextLoader(Launch.scala:128)at xsbt.boot.Launch $ .run(Launch.scala:109)at xsbt.boot.Launch $$ anonfun $ apply $ 1.apply(Launch.scala:35)at at xsbt.boot.Launch $ .launch(Launch.scala:117)at xsbt.boot.Launch $ .apply(Launch.scala:18)at xsbt.boot.Boot $ .runImpl(Boot.scala:41)at xsbt . boot.Boot $ .main(Boot.scala:17)at xsbt.boot.Boot.main(Boot.scala)引起:java.lang.ClassNotFoundException:sbt.State $ Next at java.net.URLClassLoader $ 1.run( URLClassLoader.java:202)在java.security.AccessController.doPrivileged(Native Method)java.net.URLClassLoader.findClass(URLClassLoader.java:190)java.lang.ClassLoader.loadClass(ClassLoader.java :) 6 .lang.ClassLoader.loadClass(ClassLoader.java:247)...在执行sbt期间出现10多个错误:java.lang.NoClassDefFoundError:sbt / State $ Next

我的sbt文件看起来像 -

name := "Simple Project"

version := "1.0"

scalaVersion := "2.10.4"

libraryDependencies += "org.apache.spark" %% "spark-core" % "1.2.0"

请让我知道如何解决这个问题,我是scala和sbt概念的新手 . 谢谢

回答(0)