Play! framework - views aren't compiled?

后端 未结 7 905
暗喜
暗喜 2021-01-05 08:43

I created a new project and working with eclipse (used eclipsify command).
basically, I moved the app directory from an old project to the new

相关标签:
7条回答
  • 2021-01-05 08:54

    According to jetbrains, the issue with templates is fixed. If you have play 2 generated source sources included in the IDEA project then you should exclude this folder from the project

    http://www.jetbrains.com/idea/webhelp/configuring-folders-within-a-content-root.html

    and do File | Invalidate caches and restart.

    If you have an SBT project, open it in IDEA via File | Import Project | Sbt type project

    Make sure to use the latest Scala and Play 2 plugins.

    0 讨论(0)
  • 2021-01-05 08:55

    Re-run the command in play console with the sources this time:
    $ eclipse with-source=true

    And then go to eclipse and clean your project and build all

    0 讨论(0)
  • 2021-01-05 08:59

    The best you can do is just search the Stack Overflow as this topic was discussed really many times.

    • Playframework - Eclipse can't detect a new template
    • How to make Eclipse see the changes in Play! compiled templates?
    • scala code causes error in eclipse for playframework-2.0
    • etc, etc...
    0 讨论(0)
  • 2021-01-05 09:15

    For Java Play Framework v2.4.6 (activator v1.3.7) with Eclipse Mars:

    So that you will not have a "can not resolve error" with your viewTopic.render(), you can add this <classpathentry kind="lib" path="target/scala-2.11/classes"/> to your .classpath or right-click on your project -> Build Path -> Configure Build Path -> Add Class Folder and make it point to target/scala-2.11/classes.

    0 讨论(0)
  • 2021-01-05 09:16
    1. Close eclipse project
    2. activator eclipse
    3. activator compile
    4. Open eclipse project
    5. Add target/scala-[your-version-here]/classes to your build path as a class folder
    0 讨论(0)
  • 2021-01-05 09:20
    • Run 'play eclipse' on the command line
    • In Eclipse, refresh your Project via hitting F5
    0 讨论(0)
提交回复
热议问题