Could not fetch model of type 'EclipseProject' using Gradle

倖福魔咒の 提交于 2019-12-11 09:05:38

问题


I have a gradle project which is configured and working fine in Windows environment but the same is not working when I try and run it in Mac.

Project and Environment Configuration:

Gradle 2.5/2.6
Eclipse Luna/Mars
Gradle Project using SpringBoot

The gradle project is checked out from the SVN but when I run the project as Gradle project it gives me the below error:

Configuration with name 'default' not found. Could not fetch model of type 'EclipseProject' using Gradle installation '/Users/vips/Documents/Software/gradle-2.6'.

I have downloaded and configured Gradle 2.5 and 2.6 both but I get the same error.

Again: It works fine in Windows 7, but not in Mac.

Any help here is much appreciated.

Additional Information:
I noticed that the above issue comes only for a project that is dependent on another project. For an independent gradle project, this just works fine. All dependencies are loaded.


回答1:


Mostly the reason why it happens is because new version of gradle has to be downloaded. Once you download new version of gradle, your error will go away.

http://gradle.org/downloads




回答2:


I have figured it out. In my case, somehow one of the dependent project was not checked out correctly.

I deleted that project and did a fresh checkout from SVN and it worked.

Hope this helps.




回答3:


This "could not fetch model of type..." error can be caused by a syntax error in the build.gradle file. If so, the error has nothing to do with the Gradle or Eclipse version you are running. See this question




回答4:


It can be due to Internet connectivity while trying to connect to repository.



来源:https://stackoverflow.com/questions/32029093/could-not-fetch-model-of-type-eclipseproject-using-gradle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!