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.
Source: stackoverflow.com
Related Query
- How do I change intellij idea to compile with scala 2.11?
- How to get Scala imports working in IntelliJ IDEA with the Play framework?
- How do I get Intellij IDEA 12.0 to work with Play Framework 2.1.0 app and Scala 2.10.0?
- How to run tests on every code change in IntelliJ IDEA from Scala sbt project?
- How to know if a Scala file modified with IntelliJ Idea is saved and if it is checked into CVS?
- How do I make intellij Idea to highlight Scala script correctly with #! (shebang)
- How to generate Scala setters and getters with IntelliJ IDEA
- How to get IntelliJ IDEA 14 working with Scala on Android (SBT)
- How to work with Intellij Idea and Scala
- How to build Android project with Scala sources in IntelliJ IDEA (Community Edition)?
- How to connect to Hive in Virtual Box from IntelliJ IDEA with Spark Scala
- How to create a Scala executable jar file that is built with Maven, and has log4j included, using IntelliJ IDEA IDE
- How to use Scala in IntelliJ IDEA (or: why is it so difficult to get a working IDE for Scala)?
- How to use IntelliJ with Play Framework and Scala
- How to add Jar libraries to an IntelliJ Idea SBT Scala project?
- Scala Compiler not found in Intellij IDEA 11 with Play 2.0 project
- How to run scala code on Intellij Idea 11?
- How to debug a scala based Spark program on Intellij IDEA
- IntelliJ IDEA Hotkey for comment does not work with Scala
- How to get rid of scalac ServerException with IntelliJ Idea
- How to set up Java and Scala in one single Module in Intellij IDEA 11?
- Scala String interpolation with Format, how to change locale?
- How to run Scala code in Intellij Idea 10
- How to setup sbt/scala/play multi-module project which will work fine with Intellij scala plugin
- How to set up an IntelliJ Idea Scala project to recognize local Ivy2 cache?
- How to use my classes from Scala worksheet in IntelliJ CE with Scala plugin?
- Generate return type signature in Scala with Intellij Idea
- How to turn off Scala auto-completion of function with Unit return type in IntelliJ IDEA?
- How do you use external Scala compiler with IDEA 12?
- Stuck at "Hello World" with IntelliJ IDEA 9.0.1 for Scala
More Query from same tag
- What does <<= mean in an sbt configuration file?
- How to compose a Function1 with Function0
- How to read csv file and convert one column to Map[String, String] type in Scala+Spark?
- Implementing a Scala trait by passing functions as arguments
- cross product of arbitrary number of lists in scala
- Appending Data to List or any other collection Dynamically in scala
- Check if two adjoined elements are ordered using reduceLeft
- Expose a package object's declarations to subpackages in Scala
- How can I change the compiler flags of an sbt project without causing recompilation?
- How to create collection of RDDs out of RDD?
- Spark Row keyBy values
- How to obtain the source and javadoc files?
- Chaining logging with a simple expression in Scala
- Scala: how to parse Hexadecimal value in range 0~FFFF correctly, making sure I always end up with 16 bits, as each bit brings value on its own?
- Play 2.5 upgrade error: CompletionException - There is no HTTP Context available from here
- Summoning Scala implicits for subclasses of sealed abstract trait
- How can I get the request object in play2 framwork(scala)
- Convert Object (can be int, long, string, etc.) to Json Circe
- Refactoring Scala to use search functions as arguments results in Option[Any] issue
- Specs2: Ignore specification with a message?
- Cats IO - Make tail recursive call inside flatmap
- interrupting REPL ILoop programmatically
- Gatling Error: Could not find or load main class Engine
- How do i handle the null pointer exception error in the below udf
- Understanding scala enumerations
- How to download from Google Cloud Storage by Alpakka-gcs without providing secret-key?
- Hibernate using akka actors
- Running sbt in a Docker Container
- When using Scala futures, will chained callbacks with the same execution context be optimised into synchronous calls?
- Scala/Spark dataframes: find the column name corresponding to the max