Open AlmasB opened 3 years ago
I decided to write a bit more comlicated example so I could try it out together with Gluon Mobile: https://github.com/makingthematrix/scalaonandroid/tree/main/HelloFXGL
It turns out there's no problem with using FXGL from Scala, but there is a problem with using FXGL on Android - there is no support yet for AWT on Android :( I described my work in details in the readme file for HellFXGL (under that link above). Do you think anything can be done about it from your side? Or should I talk to Gluon?
FXGL doesn't use AWT per se and does work on Android when using Java. Have you got more info on what exactly the issue is?
Edit: ah, found the readme file, thanks
On Thu, 22 Jul 2021, 1:17 pm Maciej Gorywoda, @.***> wrote:
I decided to write a bit more comlicated example so I could try it out together with Gluon Mobile: https://github.com/makingthematrix/scalaonandroid/tree/main/HelloFXGL
It turns out there's no problem with using FXGL from Scala, but there is a problem with using FXGL on Android - there is no support yet for AWT on Android :( I described my work in details in the readme file for HellFXGL (under that link above). Do you think anything can be done about it from your side? Or should I talk to Gluon?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/makingthematrix/scalaonandroid/issues/11#issuecomment-884866986, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3NT5X3FDEV73JQ4JO6XILTZAD5HANCNFSM5AVVWO7Q .
Right, the issue is with the graalvm version I believe. I tried this with one of the latest stable builds and got the same runtime error. Version 20.2.0 works fine though. As far as I'm aware this is will be fixed eventually, but I wonder what exactly triggers this awt load call -- will check.
Thanks for the Scala example!
@AlmasB : I was able to get the error with only adding FXGL to dependencies, without using it in the code. Maybe one of FXGL dependencies uses AWT?... I wrote about it in a comment here.
Hi @makingthematrix
Following our quick chat on Twitter, please see a standalone example below:
Maven dep coordinates:
Example:
The example, when executed, will open a 800x600 window with "Hello World" text.