Skip to content Skip to sidebar Skip to footer

Build Failure For Javafx Android App Using The Gluon Mobile Plugin

I just started a new gluon mobile multi view project with FXML and tried to run it before changing anything (apart from updating the jfxmobile-plugin version in the build.gradle fi

Solution 1:

Based on your log, I noticed you were using a 32 bits JDK on a 64 bits OS:

Starting process 'command 'C:\Program Files(x86)\Java\jdk1.8.0_101\bin\java.exe''. Working directory: D:\Android_Projects\GluonMobile-MultiViewProjectwithFXML Command: C:\Program Files(x86)\Java\jdk1.8.0_101\bin\java.exe ...

By default, the jfxmobile plugin sets 2 GB for the JVM Xmx option on Android, and considering that on a 32 bits OS that won't be possible to allocate, the solution is setting a lower value.

Based on this line of code, you can set:

android { 
     dexOptions { 
          javaMaxHeapSize '1g' 
     }
}

Or maybe a little bit more (1.5g or so?).

Note that this will be solved if you use a 64 bits JDK. Make sure you update your JAVA_HOME environment variable accordingly, as you won't need to reduce the memory for your process.

Post a Comment for "Build Failure For Javafx Android App Using The Gluon Mobile Plugin"