由於我有一些依賴性問題,我決定將我的計算機上的Scala安裝升級到版本2.12.0-M3
。我也跑了sbt -v
,之後下載了很多軟件包。升級到版本2.12後無法解決依賴關係
然而,當我嘗試刷新以下build.sbt
文件
name := """ScalaWeb"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.12.0-M3"
libraryDependencies ++= Seq(
jdbc,
cache,
ws,
specs2 % Test,
"org.sorm-framework" % "sorm" % "0.3.18"
)
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator
scalacOptions += "-Ylog-classpath"
我收到以下錯誤:
Error:Unresolved dependencies:
com.typesafe.play#twirl-api_2.12.0-M3;1.1.1: not found
com.typesafe.play#play-server_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-netty-server_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-jdbc_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-cache_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-ws_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-test_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-specs2_2.12.0-M3;2.4.6: not found
com.typesafe.play#play-omnidoc_2.12.0-M3;2.4.6: not found
版本2-12.0-M3
出現在2015年10月,它似乎令人懷疑,所有這些包仍然不相容。
我該如何解決這個問題?
PS
我無法使用Scala的版本2.11.7
因爲我有依賴
"org.sorm-framework" % "sorm" % "0.3.18"
,由於其依賴關係將產生這樣的問題:
[error] org.scala-lang.modules:scala-xml _2.11, _2.12.0-M3
[error] org.scala-lang.modules:scala-parser-combinators _2.11, _2.12.0-M3
我改變了版本,如你所說。此外,我使用'exclude'就像這樣:''org.sorm-framework「%」sorm「%」0.3.19「exclude(」org.scala-lang「,」scala-xml「)''。但是,「scala-xml」的問題仍然存在。我試圖按照您使用'exclude'鏈接的指導原則。我的代碼不正確? – octavian
我也試過''org.sorm-framework「%」sorm「%」0.3.19「exclude(」org.scala-lang.modules「,」scala-xml「)' – octavian
請參閱我的編輯。你應該強制使用scala編譯器版本。 –