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:
- Set up a libgdx project using the libgdx installer. Gradle is a dependency.
- Open the project in Eclipse.
- Set up an SSH key, clone the whole project using EGit, and perform a remote push.
- Restart Eclipse.
I am using Eclipse Luna 4.4.2 build 20150219-0600 with Java 1.8.0_25