SBT - 缺少依赖性

时间:2015-01-26 19:10:50

标签: scala sbt

好吧,我的协作者在build.sbt下面运行代码而没有任何问题,我得到了:

[error] /.../GameMap.scala:91: value revalidate is not a member of javax.swing.JFrame
[error]     frame.revalidate()
[error]           ^
[error] /.../GameMap.scala:92: value revalidate is not a member of java.awt.Container
[error]     frame.getContentPane.revalidate()
[error]                          ^

我怀疑,build.sbt中缺少一些东西:

scalaVersion := "2.10.4"

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

// scalacOptions ++= Seq("-feature")                                                                                                                                    

libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-actor" % "2.3.8",
  "com.typesafe.akka" %% "akka-cluster" % "2.3.8",
  "org.scala-lang" % "scala-swing" % "2.10.4"
)

这是什么?

1 个答案:

答案 0 :(得分:2)

我的猜测是你正在运行的Java 6和你的协作者正在运行Java 7

This is the Container documentation for java 6,未列出从revalidate继承的Component方法。

And here is the java 7 documentation,其中列出了从revalidate继承的Component方法

* swing

可以说明相同的内容