Module … is not backed by gradle

2019-03-14 05:26发布

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?

10条回答
神经病院院长
2楼-- · 2019-03-14 05:58

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.

查看更多
Summer. ? 凉城
3楼-- · 2019-03-14 05:59

Tools > Grails > Change SDK Version

查看更多
叼着烟拽天下
4楼-- · 2019-03-14 06:02

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.

查看更多
ゆ 、 Hurt°
5楼-- · 2019-03-14 06:05

For a non-gradle project, you can also remove the module from the project and re-import it. This will help avoid the message "module is not backed by gradle".

查看更多
登录 后发表回答