Creating Gradle project in eclipse is stuck
Asked Answered
B

3

11

I am new to gradle, and I have a problem that the eclipse got stuck when I create a gradle project

This is what I install in my eclipse luna down load eclipse plugin

And I am trying to create a gradle project in eclipse create a gradle project sample project:java quick start

The process got stuck! enter image description here

PS: I tried I create a new project and create a build.gradle myself and use gradle eclipse to configure the project , and this works fine and I can use this project in eclipse .But I have to type gradle eclipse again when I add some dependencies, or there are compile errors

Please help! Thank you!

Biz answered 18/10, 2014 at 11:37 Comment(2)
This might be a problem with network configuration in Eclipse. I.e. you are behind some proxy/firewall and Eclipse is not correctly configured to access stuff through the proxy. This would explain why running commands outside Eclipse works, but not from inside eclise. So, if you are indeed behind some kind of proxy, try configuring it via menu "Window >> Preferences >> General >> Network Connections".Duarte
Same problem here trying to import a libGDX generated demo project. No proxy at all. Did you find any solution? TIA.Stamm
A
9

The issue may be happening while trying to download and setup gradle build. You can download manually and point eclipse to the same folder.

Eclipse-->Preferences-->Gradle-->Gradle Distribution-->Folder

Areopagite answered 11/2, 2015 at 20:19 Comment(0)
O
0

May be you're running gradle behind a proxy server. You should try setting a gradle.properties in your gradle user home directory with something like this:

systemProp.http.proxyHost=mybeautiful.proxy.corp
systemProp.http.proxyPort=8080
systemProp.https.proxyHost=mybeautiful.proxy.corp
systemProp.https.proxyPort=8080
Often answered 4/3, 2016 at 10:26 Comment(1)
I also means that the best way is probably installing and validating gradle in your environement before using it in eclipse anyway. Hope this will help.Often
P
0

I had the same problem: a project's build got stuck at some point. I've verified directory structure that was created under the new project and it looked as follows:

rwxr-xr-x  4   128 Feb 21 13:02 bin
-rw-r--r--  1  1034 Feb 21 13:00 build.gradle
drwxr-xr-x  3  96 Feb 21 13:00 gradle
-rwxr-xr-x  1  5296 Feb 21 13:00 gradlew
-rw-r--r--  1  2260 Feb 21 13:00 gradlew.bat
-rw-r--r--  1  356 Feb 21 13:00 settings.gradle
drwxr-xr-x  4  128 Feb 21 13:00 src

It basically meant that all necessary directories have been created. If this is the case with your project, you can do the following to recover:

  1. Cancel build by clicking "Cancel" button in build dialog
  2. Close Eclipse
  3. Open it again. Observe that the new project was not in the list of the projects (my case)
  4. Use Import/Gradle project and navigate to the root of the new project
  5. Eclipse will rebuild everything automatically and you'll see the new project in the list
Pagano answered 21/2, 2020 at 21:16 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.