Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA w/ Scala Plugin not finding scala.concurrent

I am having the hardest time getting a fresh install of IntelliJ to work properly with Scala.

I've installed IntelliJ IDEA 13.1.4 and the Scala plugin on a Mac. In any project, the IDE complains it cannot find scala.concurrent (or any other package in scala-library) even though the library is listed under "External Libraries". What am I missing?

I've got the basic steps to reproduce down to:

  1. Install IntelliJ IDEA 13.1.4
  2. Install Scala plugin via IntelliJ plugins dialog
  3. Create a new Scala project (either SBT or non-SBT, doesn't matter)
  4. Define a new class and try to import scala.concurrent._

IntelliJ IDEA cannot resolve symbol concurrent

This happens with new or existing projects - even when provisioned via sbt gen-idea.

I've installed Scala and SBT via brew and even tried setting $SCALA_HOME to point to the brew install of scala (/usr/local/share/scala).

IntelliJ is listing the library in External Libraries but still can't resolve the symbol.

IntelliJ IDEA lists scala-library in External Libraries

I have been fighting with this for hours. What am I missing here?

like image 272
Toby Sullivan Avatar asked Sep 28 '14 22:09

Toby Sullivan


1 Answers

I had the same issue. I fixed it with Invalidate Caches

File | Invalidate Caches / restart. Manual way on Mac with removing this folder:

~/Library/Caches/IntelliJIDEAXX

like image 171
meip Avatar answered Sep 18 '22 15:09

meip