播放2.3.10和Scala 2.11.8

时间:2017-08-22 15:15:38

标签: scala playframework

我遇到了这些编译错误。它一直在为其他项目工作,但不适用于其他项目。有任何想法吗? (我已经尝试了#34;使缓存无效/重启")

warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.play#play-test_2.11;2.3.0: not found
[warn]  :: com.typesafe.play#play_2.11;2.3.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.play#play-test_2.11;2.3.0: not found
[error] unresolved dependency: com.typesafe.play#play_2.11;2.3.0: not found
[error] Total time: 4 s, completed Aug 22, 2017 5:09:59 PM

我的build.sbt是:

lazy val app = project.in(file("."))

scalaVersion := "2.11.8"

libraryDependencies ++= Seq(
  json,
  "org.scalatestplus" %% "play" % "1.2.0" % "test"
)

我的plugins.sbt是:

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.10")

1 个答案:

答案 0 :(得分:0)

根据我的猜测,因为您没有向我们展示您的build.sbt,您需要添加一个解析器,因为您使用的播放版本不在中央存储库中

对于您正在使用的播放框架,您需要在build.sbt

中添加此行

resolvers += "typesafe" at "http://repo.typesafe.com/typesafe/maven-releases/"

或者如果更好地将其更新到中央存储库具有依赖性的较新版本

// https://mvnrepository.com/artifact/com.typesafe.play/play_2.11
libraryDependencies += "com.typesafe.play" % "play_2.11" % "2.6.3"