Reputation: 159
I am learning Scala and downloaded IntelliJ Idea. I installed the Scala plugin and was instantly given the 2.12 version. Now I am trying to downgrade to 2.11 because I need this version to follow along a Coursera class I am taking.
I am having the same "UNRESOLVED DEPENDENCIES" shown in the link below: SBT project refresh failed [IntelliJ, Scala, SBT]
I tried to solve my problem by doing what @Haspemulator suggested, but I'm still getting error messages. Here is a screenshot of what I have now:
(Notice that there is a folder called scala-2.12)
Upvotes: 3
Views: 7245
Reputation: 111
CatherineAlv has already solved the problem. I am just segregating the steps together.
I too faced this problem while setting up scala for coursera course "Functional Programming Principles in Scala". By default build.sbt was showing scalaVersion
as 2.12.x but I needed 2.11.x for the course. This can be easily solved in two steps:
Change the scalaVersion
in build.sbt
. The code would look like after change:
name := "Example"
version := "1.0"
scalaVersion := "2.11.8"
Build it.
Add the libraryDependencies
to build.sbt
. The code would now look like this:
name := "Example"
version := "1.0"
scalaVersion := "2.11.8"
libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.6" % "test"
Build again.
This should solve it.
Upvotes: 1
Reputation: 7436
The error you get states that "Cannot add dependency ... to configuration "Test" because this configuration doesn't exist!" There's no such predefined configuration as "Test". There's only "test" (lower case). Try to use it instead.
Upvotes: 1