0

I am having some issues with the Play framework. It won't compile anymore, giving the following error:

java: cannot find symbol
  symbol:   variable debug
  location: class controllers.Application

Indeed this line in Apllication.java is underlined in red in IDEA, but as far as I remember that has always been the case:

enter image description here

I do have a debug.scala.html file under views. If I change the above return statement to return ok(); everything compiles fine, but that of course removes all functionality.

PS: The fact that that IDEA thinks that there are errors in the Play code, even when there are none and it all compiles fine, makes debugging somewhat difficult, I find. (As in screenshot above.) Is there a fix for this?

4

2 回答 2

2

Idea 尝试通过用专用替换通配符导入来优化导入,因此您可以轻松地手动添加此导入:

import views.html.debug;

提示:另一方面,尽量不要将您的视图命名为debuginfo。-PlayLogger有这样的方法,所以如果您不小心编写导入,您可能会不小心在错误的地方使用它,所以最好将这些视图称为debugView.scala.html

于 2013-06-30T12:00:04.050 回答
1

发现错误:早些时候,我做了一些重构,IDEA决定从文件中删除以下导入,因为它认为它没有被使用:

import views.html.*;
于 2013-06-30T11:28:47.410 回答