Skip to content Skip to sidebar Skip to footer

How To Debug A Javafx Application For Android In Eclipse

I create a big JavaFX application that works fine in desktop. In Android, its size is about 20 Mbytes. Now, for deploying it for Android, I have installed Gluon (JavaFxPorts). With

Solution 1:

Debugging JavaFX projects on Android so far doesn't work on Android emulators.

Command Line

The usual approach is just log messages to the console (i.e. System.out.println() or Log.v()...), and then using adb logcat.

On command line, go to your Android sdk folder, enter into the platform-tools folder and run adb logcat -v threadtime. That will give you all the log messages from your device, so you'll need to find your FXActivity pid there and filter through it.

Another possibility is using Android's monitor under the tools folder, a GUI tool that will allow filtering the console messages.

Eclipse

There is an ADT plugin for Eclipse, that can be installed following this question. This will allow you displaying logCat and device windows among others. Basically this will offer the same options as the monitor tool.

However, this doesn't seem to work with recent versions of logcat.

Android Studio

You can import your gradle project with Android Studio and enable the Android framework, so you can open the Android Monitor, and easily filter the logcat messages, or switch to the monitor tab with live charts of memory, cpu, ...

Android Monitor

Black screen

Typically a black screen means you have some exception going on, so you need to use any of the above mentioned logging methods to track it down, solve it and try again.

Post a Comment for "How To Debug A Javafx Application For Android In Eclipse"