4

I'm following the sbt directions here:

The instructions say to include this in my build.sbt file:

libraryDependencies += "org.apache.lucene" % "lucene-core" % "6.4.1"

But When I put that into IntelliJ, it gives the error: unresolved artifact. Not resolved or indexed. I'm new to Scala and SBT. Can someone help?

user3685285
  • 6,066
  • 13
  • 54
  • 95
  • Try to use double percentage `"org.apache.lucene" %% "lucene-core" % "6.4.1"`, to add proper scala version to library, also check which version of scala you are using, and against which version library is built, if you will have warning, try to update your local cache, `ctrl + alt + shift + s` and then Modules, there local cache and update – Kamil Banaszczyk Mar 08 '17 at 15:17
  • Possible duplicate of ["Unknown artifact. Not resolved or indexed" error for scalatest](http://stackoverflow.com/questions/41372978/unknown-artifact-not-resolved-or-indexed-error-for-scalatest) – Rumid Mar 08 '17 at 15:45
  • Just follow instructions from the [answer](http://stackoverflow.com/a/41484503/5058677) and refresh project. – Rumid Mar 08 '17 at 15:50

1 Answers1

7

After you add library you need to refresh SBT project. you can move cursor to this error, and Option+Enter in mac or Alt+Enter in Windows/Linux for Refresh project. like:

enter image description here

chengpohi
  • 14,064
  • 1
  • 24
  • 42
  • 2
    3 hours of my life wasted because of this, all alone in the night, after everyone left the floor. Why JetBrains, why... – Mehdi LAMRANI Feb 07 '18 at 19:07