2017-08-22 63 views
0

我遇到了這些編譯錯誤。它一直在爲其他項目工作,但不適用於其他項目。有任何想法嗎? (我已經嘗試過 「無效緩存/重啓」)play 2.3.10和Scala 2.11.8

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") 
+0

可以顯示us your build.sbt文件 – Hamuel

+0

順便說一句,Scala 2.11的2.3.x最新版本是2.3.11:http://search.maven.org/#artifactdetails%7Ccom.typesafe.play%7Cplay_2.11%7C2.3.10%7Cjar (推薦將其升級到2.5.x或將事件升級到2.6.x) – cchantep

回答

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" 
+0

相反,使用帶'%%'的交叉版本語法來指定Scala依賴項:'「co m.typesafe.play「%%」播放「%」2.6.3「' – cchantep

+0

我已經添加了這行但不起作用: 'libraryDependencies + =」com.typesafe.play「%」play_2.11「 %「2.3.10」' – rodbs

+0

嘗試用'sbt clean run'等命令來編譯程序,或者您使用的是不存在的版本 – Hamuel