Unknown cause of error in Play! Framework project and using only java in the project

I get an error message in the newly created Play! The project, and I do not know why. Can someone help me? The error I get is this: "index cannot be resolved" The error I'm getting is the following: "index cannot be resolved"

I have one more question in the game! in the web interface it says the following and I have no idea how to do this, can someone explain to me a little what it is and how to do it ?:

If you do not want to install the Scala IDE and only have Java sources in your project>, you can install the following:

EclipseKeys.projectFlavor := EclipseProjectFlavor.Java // Java project. Don't expect Scala IDE EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources) // Use .class files instead of generated .scala files for views and routes EclipseKeys.preTasks := Seq(compile in Compile) // Compile the project before generating Eclipse files, so that .class files for views and routes are present 
+5
source share
1 answer

First question)

Eclipse does not yet know about your views (also called templates ). These are the Scala classes that will be generated from your actual my_view_name.scala.html files at compile time. Therefore, after you compiled, you need to run the activator eclipse (or ' play eclipse with older versions of Play), and these errors magically disappear.

Second question)

I have never installed those . I think you should install in your project/plugins.sbt

 addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0") 

and, if you use Scala (Java only), in build.sbt

 EclipseKeys.projectFlavor := EclipseProjectFlavor.Java // Java project. Don't expect Scala IDE EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources) // Use .class files instead of generated .scala files for views and routes EclipseKeys.preTasks := Seq(compile in Compile) // Compile the project before generating Eclipse files, so that .class files for views and routes are present 
+6
source

All Articles