6

I have been trying to get play set up in IntelliJ for hours but I can't get it to work correctly.

I continuously get this error: http://imgur.com/MYY8fXI

I have tried create a project though the terminal with:

play new 

and then using the terminal to create the idea files with

idea with-sources=yes

I have also installed the play 2 plugin and used it to create the project, but I get the same error.

I am able to use the plugin I downloaded to successfully run the app and view it in my browser, but I keep getting the

Cannot resolve method 'ok(?)' error.

edit: I am using OSX, and have the ultimate version of Intellij.
edit 2: I have made a little progress. If I import the view directly using import views.html.index; it gets rid of the errors on the application. However, if I use import views.html.*; it results in the errors. Any ideas?

4

2 回答 2

2

在撰写本文时,IntelliJ 13 Ultimate 中的 play2 支持似乎存在一些小问题......

我是如何解决这些问题的:

1)导航到您的项目主管并启动您的游戏控制台(play.bat / play.sh 应该在 PATH 上)

2)在您的游戏控制台中输入命令“编译”

3)在您的游戏控制台中输入命令“idea”

4a) 如果您的 IntelliJ 项目已经打开,IntelliJ 将检测到更改并建议重新加载项目。确认您要重新加载

4b) 如果 IntelliJ 没有运行,请通过 File | 打开项目 打开...并选择您的项目目录。

这些步骤应该可以解决您的问题。

于 2014-01-13T21:53:21.663 回答
1

是否有助于确保 play 已将模板编译为类文件、“运行”+在浏览器中打开或“编译”?

于 2013-11-14T12:26:41.017 回答