Good day, everyone. I'm trying to build GraniteDS project locally: https://github.com/graniteds/graniteds but when I try to build it I'm facing:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'graniteds-master'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:76)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$1.run(DefaultScriptPluginFactory.java:148)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:156)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
Caused by: java.lang.NoClassDefFoundError: org.gradle.internal.nativeplatform.filesystem.FileSystems
at org.gradlefx.conventions.GradleFxConvention.class$(GradleFxConvention.groovy)
at org.gradlefx.conventions.GradleFxConvention.$get$$class$org$gradle$internal$nativeplatform$filesystem$FileSystems(GradleFxConvention.groovy)
I can find this class: org.gradle.internal.nativeplatform.filesystem.FileSystems in GRADLE_HOME/lib/gradle-native-2.4.jar
Does anyone know why that can happen?
I'm guessing you have installed gradle on your machine and are building using the
gradlecommand. The preferred way of using gradle is not to install it on your machine explicitly, and instead include the gradle wrapper in your source which lazily downloads a specific gradle version.I note that the project has included a gradle wrapper (
gradlew.bat) and I'm guessing that the version is different from that installed inGRADLE_HOMEon your machine.Try using the supplied gradle wrapper instead which just means typing
gradlewinstead ofgradle.