0

I'd like to import Java8 projects to my workspace. When I import them, I receive the following error message:

Loading Gradle project preview failed due to an error in the referenced Gradle build.
Could not fetch model of type 'GradleBuild' using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.8-rc-1-bin.zip'.

Build file '/home/PROJECT/git/PROJECT/libraries/build.gradle' line: 1
A problem occurred evaluating root project 'libraries'.
java.lang.UnsupportedClassVersionError: com/PROJECT/gradle/versioning/VersioningPlugin : Unsupported major.minor version 52.0
com/PROJECT/gradle/versioning/VersioningPlugin : Unsupported major.minor version 52.0

I set the Java compliance level to 1.8:

enter image description here

But still I get this error. My installed Java version is (java -version):

openjdk version "1.8.0_45-internal"
OpenJDK Runtime Environment (build 1.8.0_45-internal-b14)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)

In my opinion everything is as it should be,... So what's wrong?

EDIT:

My execution environment has the Java8-Version:

enter image description here

All build path variables point at Java8:

enter image description here

Edward
  • 4,453
  • 8
  • 44
  • 82

1 Answers1

0

Check if you're running Java 8 at Project Properties > Java Build Path > Tab Libraries. Check also your run configuration (Menu Run > Run Configurations > Tab Settings > Execution Environment)

hbelmiro
  • 987
  • 11
  • 31
  • I updated my question; but I can't change the settings of projects that are not imported yet. Anyway, the default is Java8. My run configuration does no have a tab `settings`. – Edward Oct 09 '15 at 16:23
  • Take a look at this question: http://stackoverflow.com/questions/26281466/eclipse-gradle-plugin-could-not-fetch-model-of-type – hbelmiro Oct 09 '15 at 16:35
  • I thought that im Mars the Gradle Support is integrated,... For some projects it works without additional installation of plugins,... – Edward Oct 09 '15 at 17:42
  • How are you importing your project? If you import as a Gradle Project you can specify the Java home directory. – hbelmiro Oct 09 '15 at 18:02