Search code examples
scalaintellij-ideaplayframeworksbtsbt-idea

IntelliJ not resolving Play's build.sbt libraryDependencies


I am new to IntelliJ IDE and I am trying to use it for a new Play project I am working on. I have added some libraries to the libraryDependencies in build.sbt but IntelliJ cannot seem to resolve them as External Libraries

libraryDependencies ++= Seq(
  jdbc,
  anorm,
  cache,
  "org.reactivemongo" %% "play2-reactivemongo" % "0.10.2",
  "org.webjars" % "angularjs" % "1.2.13",
  "org.webjars" % "foundation" % "5.1.1"
) 

I am using the Play 2.0 Plugin for IntelliJ Ultimate and I also have the sbt and Scala plugins installed.

When I run the play run command from the command line everything compiles and works fine, but it is annoying seeing all the errors in the IDE:

enter image description here


Solution

  • Run additionally

    play idea
    

    or

    play "idea with-sources=yes"
    

    And reload project when IntelliJ will ask for that