Smi*_*ley 5 java eclipse playframework
我在最近创建的Play上收到错误!项目,我不知道为什么.谁能帮我?我得到的错误如下:"索引无法解析"

我还有另一个问题,在剧中!框架网,它说以下,我不知道该怎么做,有人可以向我解释一下这是什么以及如何做到这一点?:
如果您不想安装Scala IDE并且在> project中只有Java源代码,那么您可以设置以下内容:
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
Run Code Online (Sandbox Code Playgroud)
第一个问题)
Eclipse还不了解您的视图(也称为模板).它们是Scala类,它们将my_view_name.scala.html在编译期间从您的实际文件生成.因此,在编译之后,您必须运行activator eclipse(或
play eclipse使用旧版本的Play)并且这些错误会神奇地消失.
第二个问题)
我从来没有设置过那些.我想你必须在你的project/plugins.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
Run Code Online (Sandbox Code Playgroud)
并且,如果你在你的使用中没有使用Scala(仅限Java) 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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
992 次 |
| 最近记录: |