1

I made a JavaFX project and I generate a Gradle build file with eclipse. My build file is in /workspace/Puzzle_FX i use the JavaFXPort get started, but when i type ./gradlew android i got this error :

Unzipping /Users/usr/.gradle/wrapper/dists/gradle-1.12-all/2apkk7d25miauqf1pdjp1bm0uo/gradle-1.12-all.zip to /Users/usr/.gradle/wrapper/dists/gradle-1.12-all/2apkk7d25miauqf1pdjp1bm0uo
Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
    at org.gradle.wrapper.Install.createDist(Install.java:47)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:220)
    at java.util.zip.ZipFile.<init>(ZipFile.java:150)
    at java.util.zip.ZipFile.<init>(ZipFile.java:164)
    at org.gradle.wrapper.Install.unzip(Install.java:160)
    at org.gradle.wrapper.Install.access$400(Install.java:29)
    at org.gradle.wrapper.Install$1.call(Install.java:70)
    at org.gradle.wrapper.Install$1.call(Install.java:47)
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
    ... 3 more

I install the Android SDK and I use gradle command to download all file. I'm working on Mac OS X Yosemite. I installed gradle with brew command. So how can I create my Android apk with gradle to convert my JavaFX project to Android file with JavaFXPort ?

Jackie
  • 143
  • 1
  • 3
  • 8
  • What gradle version are you using? – José Pereda Apr 12 '15 at 10:39
  • But on your stacktrace it says 1.12... – José Pereda Apr 12 '15 at 10:41
  • I use gradle command and i got this message "Welcome to Gradle 2.3. To run a build, run gradle ... To see a list of available tasks, run gradle tasks To see a list of command-line options, run gradle --help To see more detail about a task, run gradle help --task BUILD SUCCESSFUL" – Jackie Apr 12 '15 at 10:41
  • I will edit my post to show you what did gradle command – Jackie Apr 12 '15 at 10:45
  • Every JavaFXPorts project has a custom **gradlew** file, not exactly the same as using the default gradle one. The latter should work too. But in this path /Users/usr/.gradle/wrapper/dists/ it should take the 2.3 version. Could you show in your post at what point (which task) does that exception appear? – José Pereda Apr 12 '15 at 10:54
  • Should I show you the line in each files in the exception ? – Jackie Apr 12 '15 at 11:00
  • No, when you run `gradlew android`, several tasks are executed: :compileJava, :compileRetrolambdaMain, :processResources, :classes, :compileAndroidJava, :compileRetrolambdaAndroid... One of those gives that exception.Which one is it? – José Pereda Apr 12 '15 at 11:02
  • I copy/past the gradlew file on post – Jackie Apr 12 '15 at 11:05
  • That's not what I meant. When you run that file with `android` task, several tasks are performed. One is giving you an exception, can you tell which task is that? Could you post the whole output, not just the exception? – José Pereda Apr 12 '15 at 11:08
  • I don't know where these tasks are performed By the way all task give me this exception. – Jackie Apr 12 '15 at 11:11
  • Run again `gradlew android` on command line, and try to post all the output you get. Also you can remove the gradle 2.3 output from your post, it's not relevant. – José Pereda Apr 12 '15 at 11:13
  • when I run `./gradlew android` on command i get the same thing that i post – Jackie Apr 12 '15 at 11:15
  • Have you added gradle to your path environmental system variable? Maybe it's pointing to that old 1.12 version. – José Pereda Apr 12 '15 at 11:19
  • No I didn't how can I do this ? – Jackie Apr 12 '15 at 11:21
  • I'm not a Mac user, but [this](http://stackoverflow.com/questions/25385934/setting-environment-variables-via-launchd-conf-no-longer-works-in-os-x-yosemite) may help you. – José Pereda Apr 12 '15 at 11:24
  • Thank you, i will try this after my dinner. But i can use Linux or windows for this if I failed. – Jackie Apr 12 '15 at 11:26

0 Answers0