Add Scala SDK to module

You used to be able to add Scala to a module using Add Framework Support but Scala is no longer listed as a framework.  How do you add Scala as a framework/facet/whatever it's called now?  For example, I'm getting "Skipping files without a Scala SDK" now that I've upgraded to Intellij 15.

11 comments
Comment actions Permalink

Hi, Eric!

When using "Add Framework Support" You should see Scala in the list

Do you have the Scala plugin in the list of plugins? Is it turned on?

Can you create a Scala Project?

 

0
Comment actions Permalink

I'm experiencing the same issue, and it's very unproductive. I'm on IDEA 2017.3, Scala plugin enabled.

 

The way it manifests is that after a certain IDEA 2017.x upgrade (not sure which minor version), all our Scala codebases were somehow reset to not be attached to a Scala SDK.  IntelliJ recognizes the Scala files as such and does all the IntelliSense highlighting but won't compile the project with the following warning: 

 

Warning:scala: skipping Scala files without a Scala SDK in module(s) server

Add Framework Support does NOT list Scala as a Framework (despite of me having used it for a long time prior to the upgrade) 

For most projects, a dialog will eventually pop up asking me if I want to add the library to the project. And that's on a per-module basis, which for multi-module projects is very cumbersome and time sucking.

If I add Scala library as a dependency manaully in the Project Structure view, it will disappear on next SBT refresh.

Happy to file this as a bug in the issue tracker, this has been a major source of frustration on our team.

7
Comment actions Permalink

Facing the same issue

1
Comment actions Permalink

I am facing the same issue as described by Greg. No option to add Scala in the Add Framework Support. Scala plugin is enabled.

0
Comment actions Permalink

Same here. Scala plugin enabled; I can create a Scala project. "Add framework support..." lists Groovy, Kotlin/JVM, Kotlin/JS, Maven; NOT Scala.

Every once in a while I encounter this problem. Especially after updates of IDEA and the Scala plugin. Then I solve it, and forget it; encounter it again etc.

The support pages do not provide helpful solutions.

 

1
Comment actions Permalink

This time I solved something:

In Project Settings | Modules there was a module `main` and an application module therein.

I removed the latter, and now the Scala compiler is run, at least.

But the build.sbt file is ignored, and Project Settings | Projects lists 41 issues with sbt libraries not being used. I opened the "sbt" window, clicked on the button "refresh all sbt projects"; that fixed the 41 issues. But: the application module was back there again, as well as the "Warning:scala: skipping Scala files without a Scala SDK in module(s) ...".

0
Comment actions Permalink

Please file a bug at https://youtrack.jetbrains.com/issues/SCL with the sample project to reproduce. Specify IntelliJ IDEA, Scala and SBT versions you are using.

0
Comment actions Permalink

Had the same problem when upgrading from 2017.3 community to 2018.1 ultimate.

For me it helped to delete all .idea folders before opening with IDEA 2018.1 ultimate.

2
Comment actions Permalink

You can add Scala SDK as global library for your project in `Project Settings -> Platform Settings / Global Libraries -> Add -> Scala SDK`

0
Comment actions Permalink
- Ctrl RMB on scala module
- Open Module settings
- Add Scala library support
- Add Framework Support...
- Scala
0
Comment actions Permalink

Still having this problem in IDEA 2019.2 with scala sdk 2.13.0. Cannot add scala as FrameWork to project or in 'Modules' under Project Settings.

3

Please sign in to leave a comment.