IntelliJ IDEA w / Scala Plugin does not find scala.concurrent

It's hard for me to get a new IntelliJ installation to work properly with Scala.

I installed IntelliJ IDEA 13.1.4 and the Scala plugin on Mac. In any project, the IDE complains that it cannot find Scala.concurrent (or any other package in scala-library), although the library is listed in the External Libraries section. What am I missing?

I have the basic steps for playing down:

  • Install IntelliJ IDEA 13.1.4
  • Install the Scala plugin through the IntelliJ plugins dialog box.
  • Create a new Scala project (either SBT or not SBT, it doesn't matter)
  • Define a new class and try importing Scala.concurrent._

IntelliJ IDEA cannot resolve symbol concurrent

This happens with new or existing projects - even if through sbt gen-idea .

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

IntelliJ lists the library in external libraries, but still cannot resolve the character.

IntelliJ IDEA lists scala-library in External Libraries

I struggled with this watch. What am I missing here?

+7
scala intellij-idea
source share
2 answers

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

File | Invalidate Caches / restart . Manual method on Mac with deleting this folder:

~ / Library / cache / IntelliJIDEAXX

+5
source share

I had the same problem and the above advice did not help me. After searching and reading JetBrains tickets, I found out that I had a variable $ JAVA_HOME pointing to JDK 1.7: JAVA_HOME = / Library / Java / JavaVirtualMachines / jdk1.7.0_45.jdk / Contents / Main

Removing from the current shell ( unset JAVA_HOME ) and the shell profile (in my case .zshrc ) resolved the problem.

0
source share

All Articles