[error] object Routes extends Router.Routes {

[info] Compiling 20 Scala sources to /home/ze/Project/dm6467t-cn/target/scala-2.9.1/classes...
[error] /home/ze/Project/dm6467t-cn/target/scala-2.9.1/src_managed/main/routes_routing.scala:14: object creation impossible, since:
[error] method prefix in trait Routes of type => String is not defined
[error] method setPrefix in trait Routes of type (prefix: String)Unit is not defined
[error] object Routes extends Router.Routes {
[error] ^
[error] one error found
[error] {file:/home/ze/Project/dm6467t-cn/}dm6467t-cn/compile:compile: Compilation failed[error] application -

! Internal server error, for request [GET /] ->
sbt.PlayExceptions$CompilationException: Compilation error [object creation impossible, since:
method prefix in trait Routes of type => String is not definedmethod setPrefix in trait Routes of type (prefix: String)Unit is not defined]

at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$4$$anonfun$apply$12$$anonfun$apply$13
.apply(PlayReloader.scala:223) ~[na:na]
at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$4$$anonfun$apply$12$$anonfun$apply$13
.apply(PlayReloader.scala:223) ~[na:na]
at scala.Option.map(Option.scala:133) ~[scala-library.jar:0.11.3]
at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$4$$anonfun$apply$12.apply(PlayReloader.scala:223) ~[na:na]
at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$4$$anonfun$apply$12.apply(PlayReloader.scala:220) ~[na:na]
at scala.Option.map(Option.scala:133) ~[scala-library.jar:0.11.3]


造成上述原因有两个:

  1. 第一个是版本问题,你运行的项目很可能是用Play 2.0.4或者低于项目构建版本;
  2. 第二个是你的project/plugins.sbt有问题,比如说,

// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.1-06052012")

这时就要把其中的2.1-06052012改成2.0.4或2.0.3

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值