2016-12-04 47 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。