OK, I have made some progress now.
I installed the gradle plugin's in Netbeans and copied the project-structure from MultiProject (from javafxports/samples).
Then I applied the ServiceLocator pattern from the first example (mentioned by Johan earlier in this thread).
I have gotten the desktop-part to work and almost the android-part... I get the GUI displayed and when I touch it I get into my class in the Android-project, in there I make this call to Android-API:
Toast.makeText(FXActivity.getInstance(), "[my message]", Toast.LENGTH_SHORT);
When this is called I get the following stack-trace:
E/AndroidRuntime(10926): java.lang.RuntimeException: Can't create handler inside
thread that has not called Looper.prepare()
E/AndroidRuntime(10926): at android.os.Handler.<init>(Handler.java:200)
E/AndroidRuntime(10926): at android.os.Handler.<init>(Handler.java:114)
E/AndroidRuntime(10926): at android.widget.Toast$TN.<init>(Toast.java:336
)
E/AndroidRuntime(10926): at android.widget.Toast.<init>(Toast.java:100)
E/AndroidRuntime(10926): at android.widget.Toast.makeText(Toast.java:250)
Any ideas of what's going on here? Have I used the FXActivity in the right way?