Intellij IDEA can not resolve symbol with Play framework

前端 未结 7 1335
太阳男子
太阳男子 2020-12-03 02:58

I am using IDEA 13 with Play 2.2.1 and was doing the examples on the play site.

public static Result index() {
   return redirect(routes.Application.tasks())         


        
7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-03 03:29

    I had to add the below plugin entry to my plugins.sbt (under projects folder) for intellij IDEA to resolve play variables like routes etc.

    addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")

    Note: After adding the above plugin to plugins.sbt, run the below commands to rebuild idea and resolve the issue:

    • activator clean
    • activator idea

提交回复
热议问题