我正在尝试使用sbt 0.12在Scala中创建一个新的播放应用程序myFirstApp。我在myFirstApp /文件夹中有build.sbt。我还将plugins.sbt添加到myFirstApp / project /文件夹。
Build.sbt
import play.Project._
name := "My first application"
version := "1.0"
playScalaSettings
plugins.sbt
// Typesafe snapshots
resolvers += "Typesafe Snapshots" at "http://repo.typesafe.com/typesafe/snapshots/"
resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/"
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0-M1")
build.properties
sbt.version=0.12.3
从myFirstApp文件夹执行sbt时,我收到错误:
error: not found: value playScalaSettings
如何摆脱它?
答案 0 :(得分:7)
只需更改
<强> build.properties 强>
sbt.version=0.13.0
和
<强> plugins.sbt 强>
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.3")
截至2014年5月9日,该插件的最后稳定版本为2.2.3。您可以查看Typesafe repo获取最新版本。
Play 2.2目前没有SBT 0.12.x插件:http://repo.typesafe.com/typesafe/releases/com.typesafe.play/sbt-plugin/scala_2.10/ 我的M1也不在回购http://repo.typesafe.com/typesafe/releases/com.typesafe.play/sbt-plugin/scala_2.10/sbt_0.13/
中