0

我正在使用 sbt 编译 scala 代码,并收到以下错误消息

[error] /user/xyin/Projects/measurement_wspark/src/main/scala/json2csv.scala:41: bad symbolic reference. A signature in DefaultReads.class refers to term time
[error] in package java which is not available.
[error] It may be completely missing from the current classpath, or the version on
[error] the classpath might be incompatible with the version used when compiling DefaultReads.class.
[error]         val ts = (json \ "RequestTimestamp").validate[String]
[error]                                                      ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed

我正在使用 play json 库来解析我的主类中的 json 文件。build.sbt 文件的内容如下:

name := "json_parser"

version := "1.0"

scalaVersion := "2.10.1"

libraryDependencies += "org.apache.spark" %% "spark-core" % "1.6.1"
resolvers += "Typesafe Repo" at "http://repo.typesafe.com/typesafe/releases/"
libraryDependencies += "com.typesafe.play" %% "play-json" % "2.4.8"

我对 scala 和游戏框架完全陌生。有人对这个问题有任何线索吗?谢谢!

4

0 回答 0