score:0

You'll have to add first a new scala-compiler in File > Other Settings > Default Project Structure…

In scala-compiler include:

<SCALA_HOME>/lib/scala-compiler.jar
<SCALA_HOME>/lib/scala-library.jar
<SCALA_HOME>/lib/scala-reflect.jar

Replace with your scala installation directory.

Go to File > Project Settings… and select the newly created compiler-library in "Compiler library". You may have to select Scala 2.11 in Language Level as well.

score:2

add this to your build.sbt file

scalaVersion='2.11.11'

score:5

As of intelliJ version: 2021.1.1 go to:

File->Project structure->Platform settings->Global libraries

press "+" and add/download Scala sdk

score:7

In .iml file, there is entry for scala sdk library as shown below:

<orderEntry type="library" name="scala-sdk-2.10.6" level="application" />
<orderEntry type="library" name="scala-sdk-2.11.8" level="application" />

comment or remove the scala sdk version entry that you dont want.

score:11

I have had the same issue as you. I added scala version 2.11 in my build.sbt. After that, I removed the default scala SDK by

  • Go to File > Other Settings > Default Project Structures > Platform Settings > Global Libraries
  • Remove scala-sdk-2.10.6

Hence, IntelliJ will pick up my project scala SDK (after I do sbt assembly)

score:39

In IntelliJ 2016.x you upgrade Scala by

Ensure Scala Plugin up to date.

Then by going to:

File | Other Settings | Default Project Structure | Global Libraries

Click the + button at the top left hand side of the Window

Select Scala SDK

Choose the version you want to install.


Related Query

More Query from same tag