我在build.sbt
:
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.4-SNAPSHOT"
libraryDependencies += "com.typesafe.akka" %% "akka-slf4j" % "2.4-SNAPSHOT"
当我编译它时,它说:
::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.akka#akka-actor_2.10;2.4-SNAPSHOT: not found
[warn] :: com.typesafe.akka#akka-slf4j_2.10;2.4-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
为什么?即使在这里http://doc.akka.io/docs/akka/snapshot/intro/getting-started.html它也说它必须存在。
在其目录
中SBT-版本 [info] 0.12.1
在我家庭用户的目录中:
$ sbt sbt-version
[info] Set current project to alex (in build file:/Users/alex/)
[info] 0.13.7
即使在sbt.version=0.12.4
之后,错误仍然存在。
// name := "my_name123"
version := "0.1"
//scalaVersion := "2.10.4"
resolvers += "Akka Snapshot Repository" at "http://repo.akka.io/snapshots/"
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
//resolvers += "typesafe-snapshots" at "http://repo.typesafe.com/typesafe/snapshots/"
scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation", "-optimise") // , "-feature"
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.4-SNAPSHOT"
libraryDependencies += "com.typesafe.akka" %% "akka-slf4j" % "2.4-SNAPSHOT"
unmanagedResourceDirectories in Compile <+= baseDirectory( _ / "src" / "main" / "scala" )
unmanagedResourceDirectories in Compile <+= baseDirectory( _ / "src" / "main" / "java" )
libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.0" % "test"
答案 0 :(得分:5)
您还必须将Akka快照解析器添加到build.sbt
:
resolvers += "Akka Snapshot Repository" at "http://repo.akka.io/snapshots/"