【问题标题】:play framework: Modules were resolved with conflicting cross-version suffixes播放框架:模块已解决,跨版本后缀冲突
【发布时间】:2014-12-16 17:53:32
【问题描述】:

我想在播放框架中使用弹性搜索,所以我关注了this guide

这是我的 build.sbt 文件

name := """es-with-play"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.1"

libraryDependencies ++= Seq(
  jdbc,
  anorm,
  cache,
  ws,
  "com.clever-age" % "play2-elasticsearch" % "1.4-SNAPSHOT"
)

resolvers +=   "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

在游戏控制台中,当我编译代码时会出现以下错误

[error] Modules were resolved with conflicting cross-version suffixes in {file:/media/sara/New%20Volume/programs/programs/play/es-with-play/}root:
[error]    com.jsuereth:scala-arm _2.11, _2.10
[error]    com.typesafe.play:play-functional _2.11, _2.10
[error]    com.typesafe.akka:akka-actor _2.11, _2.10
[error]    com.typesafe.play:play-json _2.11, _2.10
[error]    com.typesafe.play:play _2.11, _2.10
[error]    com.typesafe.play:play-iteratees _2.11, _2.10
[error]    com.typesafe.akka:akka-slf4j _2.11, _2.10
[error]    org.scala-stm:scala-stm _2.11, _2.10
[error]    com.typesafe.play:play-datacommons _2.11, _2.10
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) Conflicting cross-version suffixes in: com.jsuereth:scala-arm, com.typesafe.play:play-functional, com.typesafe.akka:akka-actor, com.typesafe.play:play-json, com.typesafe.play:play, com.typesafe.play:play-iteratees, com.typesafe.akka:akka-slf4j, org.scala-stm:scala-stm, com.typesafe.play:play-datacommons
[error] Total time: 10 s, completed Dec 16, 2014 2:22:39 PM

我正在使用 play 2.3 和 scala 版本是 2.11.1 和 elasticsearch-1.4.1 请帮助我如何解决此错误

【问题讨论】:

    标签: scala playframework elasticsearch playframework-2.3 scala-2.11


    【解决方案1】:

    您使用的是 Play 2.3,但 github page 声明 play2-elasticsearch 1.4 仅与 Play 2.2 兼容。此外,似乎还没有针对 Scala 2.11 编译的可用版本(请参阅this issue)。 所以,我想你需要降级到 Play 2.2.1 和 Scala 2.10,或者尝试使用排除在 github 问题中提到的解决方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-02-01
      • 2017-07-01
      • 2014-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-15
      • 2014-08-29
      相关资源
      最近更新 更多