如何用sbt创建一个新的游戏项目

时间:2014-10-28 08:09:07

标签: scala playframework playframework-2.0

您好我正在尝试使用sbt(scala构建工具)创建一个播放项目我正在关注this tutorial

部分"创建新的应用程序而不安装Play"  我接受了同样的指示

这是我的项目/ Build.scala文件

import sbt._
import Keys._
import PlayProject._

object  ApplicationBuild extends Build {
    val appName ="playsbtproj"
    val appVersion  ="1.0"
    val main = PlayProject(
    appName, appVersion, appDependencies, mainLang =SCALA
    )
}

这是我的项目/ plugins.sbt文件

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.3")

当我在我的项目中键入sbt folers sbt给了我跟随erorrs

[info] Loading project definition from /opt/programs/play/playsbtproj/project
[info] Compiling 1 Scala source to /opt/programs/play/playsbtproj/project/target/scala-2.10/sbt-0.13/classes...
[error] /opt/programs/play/playsbtproj/project/Build.scala:3: not found: object PlayProject
[error] import PlayProject._
[error]        ^
[error] /opt/programs/play/playsbtproj/project/Build.scala:8: not found: value PlayProject
[error]     val main = PlayProject(
[error]                ^
[error] two errors found
[error] (compile:compile) Compilation failed
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? sarawaheed@ubuntu:/opt/programs/play/playsbtproj$ 

请帮我解决这个问题

1 个答案:

答案 0 :(得分:1)

对所选版本使用 valid documentation (在您的情况下为2.2.3)。

开箱即用