【发布时间】:2016-01-04 03:27:44
【问题描述】:
我所指的项目有以下build.sbt 文件:
name := "esc-index"
version := "1.0"
scalaVersion := "2.11.7"
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/repo/"
libraryDependencies ++= {
Seq(
"com.typesafe.play" %% "play" % "2.3.10",
"com.novocode" % "junit-interface" % "0.8" % "test"
)
}
在执行 sbt compile 时,出现以下错误。
$ sbt compile
[info] Loading project definition from C:\Users\AnandKrishnan\Documents\GitHub\esc\index\project
[info] Set current project to esc-index (in build file:/C:/Users/AnandKrishnan/Documents/GitHub/esc/index/)
[info] Updating {file:/C:/Users/AnandKrishnan/Documents/GitHub/esc/index/}index...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[error] Modules were resolved with conflicting cross-version suffixes in {file:/C:/Users/AnandKrishnan/Documents/GitHub/esc/index/}index:
[error] com.typesafe.akka:akka-actor <none>, _2.11
java.lang.RuntimeException: Conflicting cross-version suffixes in: com.typesafe.akka:akka-actor
at scala.sys.package$.error(package.scala:27)
at sbt.ConflictWarning$.processCrossVersioned(ConflictWarning.scala:46)
at sbt.ConflictWarning$.apply(ConflictWarning.scala:32)
at sbt.Classpaths$$anonfun$66.apply(Defaults.scala:1164)
at sbt.Classpaths$$anonfun$66.apply(Defaults.scala:1161)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[error] (*:update) Conflicting cross-version suffixes in: com.typesafe.akka:akka-actor
[error] Total time: 3 s, completed Jan 4, 2016 8:48:19 AM
我在sbt compile 之前做过sbt clean。我也尝试排除像这样.exclude("com.typesafe.akka", "akka-actor_2.11") 这样的akka,但没有运气。
【问题讨论】:
-
能否请您从新目录尝试我在答案中发布的内容?
-
你能列出目录的内容吗(使用
tree或类似的)?您在项目中还有哪些其他文件?你可能有project目录吗?里面是什么?您在主目录中还有哪些*.sbt文件?