You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not possible to build Scala apps for Android on Apple silicon Macs at the moment (as of october 2024), because Gluon Substrate doesn't support it.
Details:
I have Homebrew and XCode on the Mac from before, giving me some tools that might not be there on a fresh start.
I downloaded graalvm-java23-darwin-aarch64-gluon-23+25.1-dev from https://github.com/gluonhq/graal/releases - the regular release didn't work - you need the one forked by the Gluon project.
Unpacked to /Library/Java/JavaVirtualMachines/graalvm-java23-darwin-aarch64-gluon-23+25.1-dev and allowed it to run: sudo xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/graalvm-java23-darwin-aarch64-gluon-23+25.1-dev
Used Maven 3.8.8 - Maven 3.9 has a number of bugs in plugin handling (actions/runner-images#7216) which makes it necessary to downgrade to 3.8.8. I installed Maven in a user folder.
Running helloscala with mvn gluonfx:run works with GluonFX plugin 1.0.16. Before building a native image I had to change gluonfx.maven.plugin.version to 1.0.24 in pom.xml. Running the app natively with mvn gluonfx:build gluonfx:nativerun then works.
Unfortunately, I couldn't build it for Android, because when I run mvn -Pandroid gluonfx:build gluonfx:package I get the error message
java.lang.IllegalArgumentException: We currently can't compile to aarch64-linux-android when running on aarch64-apple-darwin
at com.gluonhq.substrate.SubstrateDispatcher.getTargetConfiguration(SubstrateDispatcher.java:392)
The text was updated successfully, but these errors were encountered:
Trying to use the Intel version of GraalVM did't work either:
[INFO] --- gluonfx-maven-plugin:1.0.24:compile (default-cli) @ helloscala ---
java.lang.IllegalArgumentException: We currently can't compile to aarch64-linux-android when running on x86_64-apple-darwin
at com.gluonhq.substrate.SubstrateDispatcher.getTargetConfiguration(SubstrateDispatcher.java:392)
It is not possible to build Scala apps for Android on Apple silicon Macs at the moment (as of october 2024), because Gluon Substrate doesn't support it.
Details:
I have Homebrew and XCode on the Mac from before, giving me some tools that might not be there on a fresh start.
I downloaded graalvm-java23-darwin-aarch64-gluon-23+25.1-dev from https://github.com/gluonhq/graal/releases - the regular release didn't work - you need the one forked by the Gluon project.
Unpacked to
/Library/Java/JavaVirtualMachines/graalvm-java23-darwin-aarch64-gluon-23+25.1-dev
and allowed it to run:sudo xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/graalvm-java23-darwin-aarch64-gluon-23+25.1-dev
Used Maven 3.8.8 - Maven 3.9 has a number of bugs in plugin handling (actions/runner-images#7216) which makes it necessary to downgrade to 3.8.8. I installed Maven in a user folder.
.bash_profile settings:
Running helloscala with
mvn gluonfx:run
works with GluonFX plugin 1.0.16. Before building a native image I had to changegluonfx.maven.plugin.version
to 1.0.24 in pom.xml. Running the app natively withmvn gluonfx:build gluonfx:nativerun
then works.Unfortunately, I couldn't build it for Android, because when I run
mvn -Pandroid gluonfx:build gluonfx:package
I get the error messageThe text was updated successfully, but these errors were encountered: