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

I use IntelliJ IDEA Ultimate 14 and Gradle 1.2. I manage the project from the console, but I need to debug some of the code from the IDE.

When I try to make the project, this error window appears. When I try to debug the project,

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

is written in the message window. How can I add the regular output paths to the project?


Solution 1:

Try by opening the gradle task view and then click the refresh button. For me it solved the problem.

Solution 2:

I also had a similar problem, Go to : View -> Tool Windows -> Gradle.
Then press in Refresh Icon

enter image description here

Solution 3:

This fixed the issue "Please, re-import the Gradle project and try again." for me (IntelliJ Ultimate 17.3.3):

(1) Detached Gradle project:

detach

(2) Closed the project and (3) re-opened it via File > Open recent. IntelliJ will promt to import the now unlinked Gradle project. (4) Imported it and selected "Use auto-import" in the dialog.

enter image description here

Solution 4:

I had the same problem with my Intellij IDEA version 2016.2 (Mac)

The solution was: In Intellij, Click on "View" then "Tool Windows" then "Gradle" then click on enter image description here