Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why intellij import project from SBT failed

I use IntelliJ Idea 14 Ultimate.

I have a multimodule project with a project/Build.scala. Here is the layout of my project.

- myproject - module 1 - module 2 - project - Build.scala

I try to use the native SBT from scala plugin. I choose Import project from external model and then select SBT. Then I select the root folder of my project and click on Finish.

But the project is not well imported. Libraries are downloaded but all imports are in red in submodules (cannot resolve).

So I have to use sbt gen-idea, that works fine, but I would be very happy to get rid of it …

like image 523
Yann Moisan Avatar asked Jan 22 '15 17:01

Yann Moisan


People also ask

How do I import an imported project into IntelliJ?

Launch IntelliJ IDEA. If the Welcome screen opens, press Ctrl+Shift+A , type project from existing sources , and click the Import project from existing sources action in the popup. Otherwise, from the main menu, select File | New | Project from Existing Sources.

How do I get sbt tab in IntelliJ?

The sbt tool window is enabled automatically when you create or open your sbt project. Click sbt on the right sidebar to open the tool window. The tool window displays the sbt linked projects, their tasks, dependencies, and all changes made to the underlying build.

Which is the correct way to add dependencies in sbt file?

Library dependencies can be added in two ways: unmanaged dependencies are jars dropped into the lib directory. managed dependencies are configured in the build definition and downloaded automatically from repositories.


1 Answers

I had the same problem (IDEA 14 Ultimate). This solve that after import. File > Invalidate Caches / Restart... Shown here

like image 129
gopek Avatar answered Nov 22 '22 11:11

gopek