我是新來斯卡拉時蔭試圖執行SBT更新我得到Scala構建失敗?
[error] /home/workspace/Scala/SparkTwitterStreaming/project/project/build.scala:1: expected class or object definition
[error] name := "SparkTwitterStreaming"
[error]^
[error] /home/workspace/Scala/SparkTwitterStreaming/project/project/build.scala:2: expected class or object definition
[error] version := "1.0"
[error]^
[error] /home/workspace/Scala/SparkTwitterStreaming/project/project/build.scala:3: expected class or object definition
[error] scalaVersion := "2.11.6"
[error]^
[error] /home/workspace/Scala/SparkTwitterStreaming/project/project/build.scala:5: expected class or object definition
[error] libraryDependencies += "org.apache.spark" % "spark-core_2.11" % "1.6.2"
[error]^
[error] /home/workspace/Scala/SparkTwitterStreaming/project/project/build.scala:6: expected class or object definition
[error] libraryDependencies += "com.typesafe" % "config" % "1.3.0"
[error]^
[error] 5 errors found
build.scala
/build.sbt
?
name := "SparkTwitterStreaming"
version := "1.0"
scalaVersion := "2.11.6"
libraryDependencies += "org.apache.spark" % "spark-core_2.11" % "1.6.2"
libraryDependencies += "com.typesafe" % "config" % "1.3.0"
什麼是你的'build.scala' /'build.sbt'是什麼樣子?你在哪個目錄下運行'sbt update'命令? –
'name:=「SparkTwitterStreaming」 version:=「1.0」 scalaVersion:=「2.11.6」 libraryDependencies + =「org.apache.spark」%「spark-core_2.11」%「1.6.2」。 這是什麼?它具有bin,src,項目的文件夾SourceFolder:SparkTwitterStreaming – Anji
這是什麼?它是'build.sbt'嗎?或'build.scala'?它位於什麼目錄?什麼是你的sbt項目的直接結構?你從哪裏調用sbt?請包括你的問題中的所有內容。 –