Issue
I want to write an app in JavaFx and then deploy it as an Android app. I tried doing it in Eclipse with Gluon Mobile plugin but ran into too many problems.
I finally was able to write the JavaFx app in an older version of Netbeans IDE (version 8.2), Java SDK 1.8, and Gluon plugin for Netbeans. I followed these instructions to deploy a simple JavaFx app as a desktop app and it works: https://www.youtube.com/watch?v=fxPPIIeTAI4
But I am unable to deploy the Javafx app to Android with these instructions to set up Gradle Wrapper: https://docs.gluonhq.com/getting-started/#android-support. I also tried to deploy the JavaFx code to Android by doing it right in Netbeans 8.2 by on right clicking on the Project > Tasks > android > androidInstall but I keep getting a build failure:
FAILURE: Build failed with an exception.
* What went wrong:
Configured Android SDK located at "$HOME/android-sdk" is missing the build-tools directory. Please make sure that you install at least version 23.0.1 of the Android Build Tools:
- from command line run: "$HOME/android-sdk"/tools/bin/sdkmanager "build-tools;27.0.3"
- from Android Studio: see https://developer.android.com/studio/intro/update.html
I check the c:\android-sdk (Android command line tools folder) and it does have the build-tools directory and the software files in build-tools folder, and it is Android SDK 27.0.3 so I am totally frustrated and confused by this error message. I don't want to use Android studio (AS) as AS it seems difficult to write the JavaFx code in the latest A.S. Has anyeone been able to use Netbeans to deploy JavaFx code to Android?
Solution
I finally got it working by adding these lines into my build.gradle file's jfxmobile android section:
jfxmobile {
android{
manifest = 'src/android/AndroidManifest.xml'
androidSdk='path/to/android/sdk'
}
}
Answered By - J. A.