玩框架:未找到:价值参数

时间:2013-05-27 21:07:50

标签: playframework-2.0

昨天我在Play 2.1.1应用程序中遇到了一些路由问题并删除了目标文件夹的内容,迫使Play重新编译所有内容(可能是一个愚蠢的想法)。

现在我在Eclipse中遇到了一堆错误:

too many arguments for method apply: (name: String, constraint: String)play.core.DynamicPart in object DynamicPart  routes_routing.scala    /myapp/target/scala-2.10/src_managed/main   line 44 Scala Problem
too many arguments for method apply: (name: String, constraint: String)play.core.DynamicPart in object DynamicPart  routes_routing.scala    /myapp/target/scala-2.10/src_managed/main   line 40 Scala Problem
too many arguments for method apply: (name: String, constraint: String)play.core.DynamicPart in object DynamicPart  routes_routing.scala    /myapp/target/scala-2.10/src_managed/main   line 52 Scala Problem
too many arguments for method apply: (name: String, constraint: String)play.core.DynamicPart in object DynamicPart  routes_routing.scala    /myapp/target/scala-2.10/src_managed/main   line 48 Scala Problem
not found: value params routes_routing.scala    /myapp/target/scala-2.10/src_managed/main   line 96 Scala Problem
not found: value params routes_routing.scala    /myapp/target/scala-2.10/src_managed/main   line 88 Scala Problem
not found: value params routes_routing.scala    /myapp/target/scala-2.10/src_managed/main   line 112    Scala Problem
not found: value params routes_routing.scala    /myapp/target/scala-2.10/src_managed/main   line 104    Scala Problem

经过一些google和stackoverflow研究后,我尝试在项目上执行play clean compile。这样可行。我也可以启动应用程序,它似乎正常工作。

干净后我在Eclipse中尝试了Refresh。这不会改变任何事情。错误不会消失。

有什么建议吗?

谢谢!

2 个答案:

答案 0 :(得分:5)

您需要重新生成eclipse项目

  1. 开始游戏

    play
    
  2. 生成eclipse项目(在Play控制台中执行此步骤)

    eclipse with-source=true
    
  3. 刷新你的eclipse项目

    F5 (fn + F5 in Mac)
    
  4. 每次进行重要更改时都不必删除eclipse项目: - )

答案 1 :(得分:0)

猜猜我发现了:

首先我跑了play clean-all

但我想这才是真正帮助我的:

我删除了Eclipse项目(在Eclipse中右键单击>删除;不检查"删除磁盘上的内容")。 然后我运行play eclipse并将项目导入Eclipse。