Intellect IntelliJ14, Scala and Gradle

I have a project that uses Scala 2.10.4 and Gradle 1.6. I just upgraded from IntelliJ 12.1.15, where everything worked with IntelliJ 14.0.1, and now I can not run Scala code through the IDE. I tried to create a simple new project with a single Scala object that expanded the application and printed "Hello world". I can run it through IntelliJ just fine. Once I add a simple build.gradle file, I can no longer run Scala. He continues to give me an error message:

"Cannot make module: X, the associated Gradle configuration was not found. Re-import the Gradle project and try again."

I tried this and all I can think again and again, but I continue to understand the same thing. Does anyone have any suggestions to overcome this? I can run the Gradle construct through IntelliJ just fine, but I am not able to actually launch Scala through IntelliJ of some kind of defeat in order to have an IDE in the first place, because I cannot debug at all.

Thanks Adam

+5
source share
3 answers

I also had the same problem with Intellij 14.03.
That 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 a project to create a module.
4. Then it didn’t work and gave me a problem.

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

+1
source

I had the same problem with IDEA Ultimate, but then I tried Community edition and everything worked out fine. It may have been a version of IDEA, or it may have been a different version of scala / gradle. I am using IDEA 14.0.2, Scala 2.11.4, gradle 2.2.1 (think)

0
source

I had the same problem. I checked the .gradle folder containing gradle 2.1 and 2.2.1 , I deleted 2.1 and then gradle clean && gradle build , then it works fine.

0
source

Source: https://habr.com/ru/post/1208174/


All Articles