0

Recently i have been trying to transfer my javafx app on android mobile devices. Javafxports seens to be the way to do it, but I am looking for a quick way to do it through eclipse and not using the "command line", to go to a path and run gradle command. Can someone post a brief guide if there is such a way to build everything from eclipse IDE?

Thank you in advance.

javasuns
  • 1,061
  • 2
  • 11
  • 22

2 Answers2

2

How to use eclipse and gradle to install a JavaFX App on Android.

1. Download and extract e(fx)clipse ( I have downloaded the ALL_in One). I downloaded 4.4.

2. Download and install JDK 8u40 or greater from Oracle website. I downloaded v8u45 64-bit for Windows.

3. Download Android SDK Tools( I downloaded and extract android-sdk_r24.1.2-windows.zip)
     Run "SDK Manager.exe" and install
        (a) Tools -> Android SDK Build-tools 21.1.2
        (b) Android 5.0.1 (API 21) -> SDK Platform
        (c) Extras -> Android Support Library.

4. Download sample application of JavaFX and later extract it to eclipse "workspace".

5. Run eclipse and download Gradle Integration for Eclipse (4.4) by drag and drop from web to eclipse.
    If that does not work go to
         Help -> Install New Software -> Add... -> Location: http://dist.springsource.com/release/TOOLS/update/e4.4/ -> Core / Eclipse Integration for Gradle -> Gradle IDE

6. In Eclipse go to
    File -> Import... -> Gradle |_ Gradle Project
        (a) Browse to eclipse workspace where you have extracted "Sample Application from Step 4"
        (b) Press "Build Model" button
        (c) Choose JavaFXAndroid project and "Finish"

7. Edit "build.gradle" file and change androidSdk parameter to indicate the directory where you have extracted Android SDK Tools in Step 3

8. Check if the build runs ok on windows machine
    In Package Explorer
        Right Click on JavaFXAndroid -> Run As -> 2 Gradle Build... -> type "run" in the large editor and press "Run" button

9. Install it on an android with version > 4.
    In Package Explorer
        Right Click on JavaFXAndroid -> Run As -> 2 Gradle Build... -> type "androidInstall" in the large editor and press "Run" button
        Note: Make sure that you have installed the correct ADB driver for your device and that your device is in developer mode.

10. Enjoy:)

javasuns
  • 1,061
  • 2
  • 11
  • 22
0

i dont know how the plugins on eclipse are, but on intellij you got there is gradle plugins and it reads the configured tasks. So you can configured easily your own "run". I bet you can do it to with eclipse.

Ivancodescratch
  • 405
  • 4
  • 14