I'm using IntelliJ IDEA Pro 13.1.2. Never used any versions below 13.
When trying to run build.gradle
from IDE I get the message:
Module is not backed by gradle
I can run this script from the command line just fine.
The "root" directory has both .gradle
and gradle
sub-directories and, in general its structure is very similar to another module from the same project where I can run its build from IDE without problems.
Any suggestions on further troubleshooting?
We can configure the settings for how IntelliJ IDEA syncs with Gradle by pressing the settings icon in the Gradle tool window, and selecting Auto-Reload Settings. We can set IntelliJ IDEA to automatically reload the project after "Any changes" in the build script files, so changes are automatically reloaded.
File -> Import > Gradle STS project -> Choose project root where multi-module folders reside -> click Build Model -> choose the modules I want to see in the IDE.
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:
File > Open
gradle.build opens the file for editing and doesn't solve the issuebuild/
folder created./gradlew
from the commandline only creates files for gradle and doesn't fix IntelliJIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With