我遇到以下错误消息,建议添加scalaVersion。我在build.sbt中添加了ivyScala:= ivyScala.value map {_.copy(overrideScalaVersion = true)}但是这没有解决它
[warn] Scala version was updated by one of library dependencies:
[warn] * org.scala-lang:scala-library:(2.10.0, 2.10.3, 2.10.1, 2.10.2) -> 2.10.4
[warn] To force scalaVersion, add the following:
[warn] ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }
[warn] Run 'evicted' to see detailed eviction warnings
答案 0 :(得分:1)
运行此命令时:
activator new test play-scala
...这是创建的build.sbt
文件:
name := """test"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.6"
libraryDependencies ++= Seq(
jdbc,
cache,
ws,
specs2 % Test
)
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
play-scala
模板会向文件中添加一些不明智的信息,但您可以清楚地看到scalaVersion
的指定方式。