Cannot resolve symbol split


I'm working with Intellij 12.1.4 Community edition for Mac. I installed the latest Scala plugin 0.19.298. I'm using scala 2.10.2.

On this line:


split is highlighted, and says "Cannot resolve symbol split".

If I try to navigate to it, it shows a dropdown with 2 equal options:

split(scala.collection.immutable.StringLike) SBT: org.scala-lang:scala-library:2.10.0 (scala-library.jar)
split(scala.collection.immutable.StringLike) SBT: org.scala-lang:scala-library:2.10.0 (scala-library.jar)

If I click on one of them it navigates to split method.

Any idea?

Comment actions Permalink

I solved it. My JDK was configured incorrectly. I don't know exactly what it was, because it was listed in the dependencies of the project and seemed to be correct. But I downloaded a JDK, and added it like described here:

"A: In the Project Settings dialog.
To add a JDK to project, press Ctrl+Alt+Shift+S, under Platform Settings click JDKs and specify JDK path. After that, you can click Project and specify which of JDK you have configured is used in the current projects. Remember that JDKs are configured at IDE level, so when you create another project, you won't need to add the same JDK again."

Now it works.

Comment actions Permalink

Hi Ivan,

We're going to create a special inspection for such cases. Sorry for the inconvenience.


Please sign in to leave a comment.