I've created a play project with play 2.3.7
In the project directory, I ran activator and ran the eclipse
command to generate eclipse project files.
When I go to eclipse (I'm using the Scala IDE from typesafe Build id: 4.0.0-vfinal-20150119-1023-Typesafe , there is an error in my Application.scala file:
object index is not a member of package views.html
Is there something amiss with my setup? The app runs fine when I execute run
at the activation console prompt.
Thanks!
EDIT: Added code
package controllers import play.api._ import play.api.mvc._ object Application extends Controller { def index = Action { Ok(views.html.index("Your new application is ready.")) } }
The error is on the 'Ok..' line.
There is a file in views called index.scala.html, and the app runs file when I run it from activator..
Occasionally after adding a view in Play 2.4.x, IntelliJ IDEA sometimes gets confused and absolutely refuses to build. Even rebuild Project fails:
This still happens from time-to-time in IDEA 15. And when it does, the command line provides the quickest, most-reliable fix:
sbt clean; sbt compile
That's it! IDEA will now compile the project as expected.
Update:
In the rare case that sbt compile
completed successfully on the command line, but IntelliJ IDEA 15 still gives the same "object x is not a member" error, then this has solved IDEA's confusion:
File Menu:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With