VB_
VB_

Reputation: 45722

Can't configure Scala in Intellij IDEA 13

I entered Scala courses on Coursera and used to write Scala projects in Eclipse Indigo. All worked well. But now I gonna to convert to my favorite IDE - Intellij IDEA.

But I can't configure it for Scala usage.

What I've already done:

  1. Install Scala, set system SCALA_HOME variable
  2. Install SBT
  3. Install Scala plugin on Intellij IDEA

What a problem:

  1. When I import coursera assignments, Intellij doesn't see some classes like List, Array etc. For example, when I try to import it via Alt+Enter key it propose me java.jang.reflect.Array, java.sql.Array, com.sun.xml....Array. So I can't import Scala Array with tail and head methods.

  2. When I try: New Project -> Scala Module the are to problems:

    a) When I choose Set Scala Home it complains that there are missing files

    b) When I choose Existent Library there is nothing to choose in Compiler/Standart fields.

enter image description here

Question:

How to configure Intellij properly?

Upvotes: 13

Views: 13347

Answers (3)

lukas
lukas

Reputation: 91

It can be a problem with caches, try File -> Invalidate Caches

Upvotes: 9

Dirk bachmann
Dirk bachmann

Reputation: 11

Make sure to manually add the scala-library as a dependency to your module. This is not done automatically when adding the Scala facet to an existing module.

Upvotes: 1

David Weinberg
David Weinberg

Reputation: 533

Is the directory you specified the right one? It should have bin, doc, etc. in it. If so, try entering the following by hand:

For compiler library, scala-compiler

For standard library, scala-library

IDEA found these for me automatically, but perhaps something went wrong for you.

Upvotes: 6

Related Questions