2016-12-04 41 views
0

我有以下build.sbt文件:問題導入阿卡包

name := "akkaHttp" 

version := "1.0" 

scalaVersion := "2.12.0" 


resolvers ++= Seq("Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/", 
    Resolver.bintrayRepo("hseeberger", "maven")) 


libraryDependencies ++= { 
    val AkkaVersion  = "2.3.9" 
    val AkkaHttpVersion = "2.0.1" 
    val Json4sVersion  = "3.2.11" 
    Seq(
    "com.typesafe.akka" %% "akka-slf4j"  % AkkaVersion, 
    "com.typesafe.akka" %% "akka-http-experimental" % AkkaHttpVersion, 
    "ch.qos.logback" % "logback-classic" % "1.1.2", 
    "org.json4s"  %% "json4s-native" % Json4sVersion, 
    "org.json4s"  %% "json4s-ext"  % Json4sVersion, 
    "de.heikoseeberger" %% "akka-http-json4s" % "1.4.2" 
) 
} 

在這裏面,這些依賴得不到滿足。

Error:Unresolved dependencies: 
com.typesafe.akka#akka-slf4j_2.12;2.3.9: not found 
com.typesafe.akka#akka-http-experimental_2.12;2.0.1: not found 
org.json4s#json4s-native_2.12;3.2.11: not found 
org.json4s#json4s-ext_2.12;3.2.11: not found 
de.heikoseeberger#akka-http-json4s_2.12;1.4.2: not found 

那麼,我應該添加什麼,使進口工作?

+1

據我所知,阿卡2.3.9尚未建成並發表在行家對2.12。它可用於scala 2.11.x。嘗試使用scala版本2.11.8。 –

回答

1

請注意_2.12附加到工件?根據您的scalaVersion,SBT試圖下載針對Scala 2.12.x構建的依賴項,但找不到任何依賴項。嘗試使用Scala版本2.11.8。

不同版本斯卡拉的可以是二進制兼容,所以庫建成對那些不同的版本,併發布到庫交叉。看起來上面這些圖書館還沒有發生。

注意,斯卡拉2.12確實not binary compatible使用Scala 2.11。