“object index is not a member of package views.html” when opening scala play project in scala ide

前端 未结 11 1009
隐瞒了意图╮
隐瞒了意图╮ 2020-12-09 01:36

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.

11条回答
  •  感情败类
    2020-12-09 02:23

    Basically we need a way to put the compiled classes on the path for this to work.

    I did the following to fix it. Since the projects compiles to the target directory. I went to the Project Properties -> Java Build Path and added a few folders that look like this,

    target/scala-2.12/routes/main target/scala-2.12/twirl target/scala-2.12/twirl/main

    Now i dont want you to assume you will have these exact folders in your case too. That depends on your project setup. But you should add the folders inside the target/scala-2.x folder.

提交回复
热议问题