Play Framework Activator Error

时间:2015-07-18 08:43:15

标签: playframework playframework-2.0 typesafe-activator

新项目创建后无法运行Activator命令

raghul@raghul-Inspiron-N4010:~/Documents/activator-dist-1.3.5/UZAdmin$ activator
[info] Loading project definition from /home/raghul/Documents/activator-dist-1.3.5/UZAdmin/project
/home/raghul/Documents/activator-dist-1.3.5/UZAdmin/build.sbt:17: error: not found: value routesGenerator
routesGenerator := InjectedRoutesGenerator
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

我的build.sbt文件:

name := """UZAdmin""" 

version := "1.0-SNAPSHOT" 

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

scalaVersion := "2.11.6"

libraryDependencies ++= Seq( javaJdbc, cache, javaWs ) 

// Play provides two styles of routers, one expects its actions to be injected, the 
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator

1 个答案:

答案 0 :(得分:3)

您的build.sbt缺少导入:

import play.sbt.routes.RoutesKeys._

name := """UZAdmin""" 

version := "1.0-SNAPSHOT" 

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

scalaVersion := "2.11.6"

libraryDependencies ++= Seq( javaJdbc, cache, javaWs ) 

// Play provides two styles of routers, one expects its actions to be injected, the 
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator