Play! framework - views aren't compiled?

I created a new project and working with eclipse (used eclipsify command). basically, I moved the app directory from an old project to the new one I created.

the problem is that eclipse doesn't recognize the views. I get errors like:

views.html.viewTopic cannot be resolved to a type

I tried to play compile but it didn't help. so I got 40 errors. all of them connected to the fact that the views aren't compiled and therefore, the eclipse doesn't recognize them (my guess of course).

what can I do? by the way, the old project compiled and ran without a problem (I used intellij)


The best you can do is just search the Stack Overflow as this topic was discussed really many times.

  • Run 'play eclipse' on the command line
  • In Eclipse, refresh your Project via hitting F5

Re-run the command in play console with the sources this time: $ eclipse with-source=true

And then go to eclipse and clean your project and build all

OK, I solved it.

  • I created a new app again
  • moved app dir
  • only then ran the command play idea

According to jetbrains, the issue with templates is fixed. If you have play 2 generated source sources included in the IDEA project then you should exclude this folder from the project

and do File | Invalidate caches and restart.

If you have an SBT project, open it in IDEA via File | Import Project | Sbt type project

Make sure to use the latest Scala and Play 2 plugins.

For Java Play Framework v2.4.6 (activator v1.3.7) with Eclipse Mars:

So that you will not have a "can not resolve error" with your viewTopic.render(), you can add this <classpathentry kind="lib" path="target/scala-2.11/classes"/> to your .classpath or right-click on your project -> Build Path -> Configure Build Path -> Add Class Folder and make it point to target/scala-2.11/classes.

Need Your Help

Git hook for any action that updates the working directory

git githooks

Following an answer to a previous question, I implemented a Git hook script which needs to fire whenever the working directory is updated. I linked this script to the following in .git/hooks:

How connect npm connect module?

javascript node.js npm

I used command :node-dev script.js

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.