Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ14, Scala, and Gradle integration

I have a project that use Scala 2.10.4 and Gradle 1.6. I just upgraded from IntelliJ 12.1.15 where everything worked to IntelliJ 14.0.1 and now I cannot run the Scala code through the IDE. I tried to create a simple new project with a single Scala object that extended App and printed "Hello world." I can run it through IntelliJ just fine. As soon as I add a simple build.gradle file though, I cannot run the Scala any more. It keeps giving me the error message:

"Unable to make the module: X, related gradle configuration was not found. Please, re-import the Gradle project and try again."

I have tried that and everything I can think of over and over again, but I keep getting to the same point. Does anyone have any suggestions for getting past this? I can run the Gradle build through IntelliJ just fine, but not being able to actually run the Scala through IntelliJ sort of defeats the purpose of having an IDE in the first place because I cannot debug at all.

Thanks, Adam

like image 399
Adam Vukich Avatar asked Nov 10 '22 22:11

Adam Vukich


1 Answers

I also had the same problem with Intellij 14.03.
The following is why I got the problem.
1. I created a project and it worked well.
2. I copied the project to another directory.
3. I used Intellij(File->Open) to open the project to make module.
4. Then, it didn't work and gave me the problem.

I solved it by the way:
1.Open Intellij and import the project(File->Import Project).
2.After that, it will be successful to make.

like image 173
Tao T Avatar answered Nov 14 '22 22:11

Tao T