简体   繁体   中英

Gradle exception while building GraniteDS project

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 gradle command. 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 in GRADLE_HOME on your machine.

Try using the supplied gradle wrapper instead which just means typing gradlew instead of gradle .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM