Intellij IDEA can not resolve symbol with Play framework

前端 未结 7 1337
太阳男子
太阳男子 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:21

    These steps work for me: add following lines to your plugins.sbt file:

    resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"
    addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.2.0")
    but if you don't know the correct version of sbt-idea then use this instead:
    addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "latest.integration")
    

    Warning - It will take too much time to build as it need to parse all the version and get the latest version.

    Run this command -

    sbt gen-idea
    

提交回复
热议问题