Error During Update in Eclipse Luna 4.4.2: Possible conflict with EGit

It is possible that this error is due to my faulty configuration of EGit or Gradle and may not be a bug, but perhaps an issue. My main problem is with one of the libraries that depends on Gradle. Yesterday I set up a repository for EGit. I have no other possible explanation as of yet than a conflict between EGit and Gradle. I have set up another computer with a different SSH key, but I have never remotely pulled from the repository. When starting Eclipse today, I suddenly received the error:

The import com.badlogic cannot be resolved

This library has been working just fine. When starting Eclipse there is a few messages in a box of the type:

"Update Gradle Class-path"

And then more errors in the log that at first sight seems to have to do with autoupdating Gradle:

services.gradle.org

org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-2.2.1-bin.zip'.
at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution...


Could not find property 'eclipse' on root project 'MyGame-core'.

org.springsource.ide.eclipse.gradle.core

...

org.gradle.tooling.BuildException: Could not fetch model of type 'EclipseProject' using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.2.1-bin.zip'.
....

Which seems to result in multiple errors of the type:

Could not find method android() for arguments [build_51vl3myi9i9cdtkzapxp0b46w$_run_closure1@56402b72] on root project 'MyGame-android'.

org.gradle.tooling.BuildException: Could not fetch model of type 'EclipseProject' using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.2.1-bin.zip'.
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:57)
   ....

However, the URL above is working from a browser. I tried uninstalling Gradle from Eclipse. Reinstallation only works if I deselect the toolapi. Otherwise I receive:

The following solutions are not available: Gradle Integration for Eclipse (4.4) 3.6.4.RELEASE (id=org.gradle.toolingapi.feature.feature.group, site=http://dist.springsource.com/release/TOOLS/update/e4.4/)

Reinstallation did not solve this problem. I am clueless as to the cause.

Replication:

  1. Set up a libgdx project using the libgdx installer. Gradle is a dependency.
  2. Open the project in Eclipse.
  3. Set up an SSH key, clone the whole project using EGit, and perform a remote push.
  4. Restart Eclipse.

I am using Eclipse Luna 4.4.2 build 20150219-0600 with Java 1.8.0_25

I’ve seen some issues with messages like that “gradle-2.2.1-bin.zip” reference. Is that the version of Gradle that you’re using, or are you using 2.3? I was able to get rid of messages like this by changing the “Gradle Distribution” property in the Gradle preferences to point to my installation of Gradle 2.3. Otherwise, I don’t know why this would be failing.

1 Like

@David_Karr I am now using the latest version available - the error was initially in 2.2.1. I took your advice, downloaded Gradle 2.3, and I changed the settings in Eclipse to point to the root folder. This seems to reduce some of the errors, but this error below still remains and the import statement does not resolve:

Could not find property 'eclipse' on root project 'MyGame-core'.

There seems to be a halt in the maintenance of the Eclipse plugin and a move toward BuildShip, as discussed here:

This could be a plugin level error, so I will try with the maintained BuildShip instead.

It seems that EGit moved my project to a different folder without copying the Gradle files generated from the libGDX installer.