JaskeyLam
JaskeyLam

Reputation: 15785

Creating Gradle project in eclipse is stuck

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!

Upvotes: 11

Views: 11103

Answers (3)

Oleg Gryb
Oleg Gryb

Reputation: 5259

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

Upvotes: 0

HMaximilien
HMaximilien

Reputation: 1

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

Upvotes: 0

nsbassi
nsbassi

Reputation: 91

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

Upvotes: 9

Related Questions