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

前端 未结 11 1026
隐瞒了意图╮
隐瞒了意图╮ 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:18

    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:

提交回复
热议问题