Module ... is not backed by gradle
If you didn't set up the IDE project via "Import Project" and then pointing to a Gradle project, you may have to link the IDE project to the Gradle project. This can be done in the "Gradle" window.
The answer that worked for me is to restart IntelliJ - at startup build.gradle is identified and the project is set up.
The only thing that worked for me was to use the menu File > Close Project
and reopen it. IDEA popped up a dialog saying "Import project from Gradle files" or something to that effect.
Dead ends: Below is a list of dead ends, so don't waste your time with them. I kept seeing "module is not backed by gradle" despite following all these proposed solutions:
- There was no Gradle tool window, so I couldn't synchronize the project
- Clicking
File > Open
gradle.build opens the file for editing and doesn't solve the issue - Creating a run configuration that runs gradle has no effect, even after I saw a
build/
folder created - Runing
./gradlew
from the commandline only creates files for gradle and doesn't fix IntelliJ
I fixed this problem by clicking in the Menu
--> "Run"
--> "Edit Configurations"
--> [+] The little plus in the top left corner
--> "Gradle"
With the new created run configuration it worked. I hope this will help some of you.
Tools > Grails > Change SDK Version
Like others have said, none of the other answers worked for me. The only thing that worked was:
Close the project, then import it as a Gradle project.