androidmavenjavafxgluon-mobilegluonfx

gluonfx:package fails on tutorial, unable to locate libHelloFX.so


I am working through instructions on a document provided by Gluon: https://docs.gluonhq.com/#platforms_android and have attempted the following command on my Ubuntu desktop CLI:

mvn -Pandroid gluonfx:package

Unfortunately, this failed to build. Previously, I was able to run the command mvn -Pandroid gluonfx:build successfully. (AFAIK, that is. There are no verification tests given in the document, but expected files seemed to populate and the process gave a BUILD_SUCCESS message at the end).

The exception thrown indicates that the file /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/libHelloFX.so does not exist. Indeed, the file folder /aarch64-android only holds two file folders: gensrc and gvm.

Have I overlooked something or made a mistake? The device is connected to the ubuntu system via USB. I have previously had success using this device and setup, with AndroidStudio.

Here is the console output (I have broken it into sections to facilitate horizontal scrolling):

phil@UbuntuDesktop:~/Projects/metronome/gluon-samples-master/HelloFX$ mvn -Pandroid gluonfx:package
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< com.gluonhq.samples:hellofx >---------------------
[INFO] Building HelloFX 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- gluonfx-maven-plugin:1.0.5:package (default-cli) @ hellofx ---
[Sun Sep 19 18:32:36 PDT 2021][INFO] ==================== PACKAGE TASK ====================
[Sun Sep 19 18:32:37 PDT 2021][INFO] Default Android manifest generated in /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gensrc/android/AndroidManifest.xml.
Consider copying it to /home/phil/Projects/metronome/gluon-samples-master/HelloFX/src/android/AndroidManifest.xml before performing any modification
[Sun Sep 19 18:32:37 PDT 2021][INFO] Default Android resources generated in /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gensrc/android/res.
Consider copying them to /home/phil/Projects/metronome/gluon-samples-master/HelloFX/src/android/res before performing any modification
[Sun Sep 19 18:32:38 PDT 2021][INFO] sysroot path not found and will be downloaded.
[Sun Sep 19 18:32:38 PDT 2021][INFO] Downloading Java Static Libs...
Download progress: 0.54 / 0.54M

Continuing (console output)...

[Sun Sep 19 18:32:39 PDT 2021][INFO] Java static libs downloaded successfully
[Sun Sep 19 18:32:39 PDT 2021][INFO] Downloading JavaFX static libs...
Download progress: 23.58 / 23.58M
[Sun Sep 19 18:32:44 PDT 2021][INFO] JavaFX static libs downloaded successfully
[Sun Sep 19 18:32:44 PDT 2021][INFO] Downloading additional libs for Android ...
Download progress: 0.07 / 0.07M
Download progress: 0.86 / 0.86M
Download progress: 0.92 / 0.92M
Download progress: 0.15 / 0.15M
Download progress: 0.12 / 0.12M
Download progress: 0.12 / 0.12M
Download progress: 0.03 / 0.03M
[Sun Sep 19 18:32:45 PDT 2021][INFO] Additional libs for Android downloaded successfully
[Sun Sep 19 18:32:45 PDT 2021][INFO] Downloading sysroot zip...
Download progress: 62.36 / 62.36M
[Sun Sep 19 18:33:01 PDT 2021][INFO] Sysroot zip downloaded successfully
java.nio.file.NoSuchFileException: /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/libHelloFX.so
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
...[SNIPPING OUTPUT]...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  26.042 s
[INFO] Finished at: 2021-09-19T18:33:01-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.5:package (default-cli) on project hellofx: Error: /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/libHelloFX.so -> [Help 1]

The following is from the log file: /gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gvm/log

[Sun Sep 19 18:32:36 PDT 2021][INFO] ==================== PACKAGE TASK ====================
[Sun Sep 19 18:32:36 PDT 2021][FINE] FileSystem for resource jar:file:/home/phil/.m2/repository/com/gluonhq/substrate/0.0.45/substrate-0.0.45.jar!/com/gluonhq/substrate/ not found. Trying to create a new FileSystem instead.
[Sun Sep 19 18:32:36 PDT 2021][FINE] Created FileSystem for resource jar:file:/home/phil/.m2/repository/com/gluonhq/substrate/0.0.45/substrate-0.0.45.jar!/com/gluonhq/substrate/: /home/phil/.m2/repository/com/gluonhq/substrate/0.0.45/substrate-0.0.45.jar
[Sun Sep 19 18:32:36 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/classes/hellofx/styles.css to /tmp/classes12224992800944724564/hellofx/styles.css
[Sun Sep 19 18:32:36 PDT 2021][FINE] Copied resource /home/phil/Projects/Pmetronome/gluon-samples-master/HelloFX/target/classes/hellofx/openduke.png to /tmp/classes12224992800944724564/hellofx/openduke.png
[Sun Sep 19 18:32:36 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/classes/hellofx/HelloFX.class to /tmp/classes12224992800944724564/hellofx/HelloFX.class
[Sun Sep 19 18:32:36 PDT 2021][FINE] PB Command for jar: /usr/lib/jvm/jdk-15.0.2/bin/jar cf /tmp/classes12224992800944724564/classes.jar -C /tmp/classes12224992800944724564 .
[Sun Sep 19 18:32:36 PDT 2021][FINE] Start process jar...
[Sun Sep 19 18:32:36 PDT 2021][FINE] Result for jar: 0
[Sun Sep 19 18:32:36 PDT 2021][FINE] Scanning for android dependencies files
[Sun Sep 19 18:32:36 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-base/16/javafx-base-16-linux.jar
[Sun Sep 19 18:32:36 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-base/16/javafx-base-16.jar
[Sun Sep 19 18:32:36 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-controls/16/javafx-controls-16-linux.jar
[Sun Sep 19 18:32:36 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-controls/16/javafx-controls-16.jar
[Sun Sep 19 18:32:36 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-graphics/16/javafx-graphics-16-linux.jar
[Sun Sep 19 18:32:36 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-graphics/16/javafx-graphics-16.jar
[Sun Sep 19 18:32:36 PDT 2021][FINE] Scanning /tmp/classes12224992800944724564/classes.jar
[Sun Sep 19 18:32:36 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/classes/hellofx/styles.css to /tmp/classes4372999315750769796/hellofx/styles.css
[Sun Sep 19 18:32:36 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/classes/hellofx/openduke.png to /tmp/classes4372999315750769796/hellofx/openduke.png
[Sun Sep 19 18:32:36 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/classes/hellofx/HelloFX.class to /tmp/classes4372999315750769796/hellofx/HelloFX.class
[Sun Sep 19 18:32:36 PDT 2021][FINE] PB Command for jar: /usr/lib/jvm/jdk-15.0.2/bin/jar cf /tmp/classes4372999315750769796/classes.jar -C /tmp/classes4372999315750769796 .
[Sun Sep 19 18:32:36 PDT 2021][FINE] Start process jar...
[Sun Sep 19 18:32:37 PDT 2021][FINE] Result for jar: 0

continuing (log contents)...

[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning for android permission files
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-base/16/javafx-base-16-linux.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-base/16/javafx-base-16.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-controls/16/javafx-controls-16-linux.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-controls/16/javafx-controls-16.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-graphics/16/javafx-graphics-16-linux.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-graphics/16/javafx-graphics-16.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /tmp/classes4372999315750769796/classes.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gvm/android_project/app/src/main/AndroidManifest.xml to /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gensrc/android/AndroidManifest.xml
[Sun Sep 19 18:32:37 PDT 2021][INFO] Default Android manifest generated in /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gensrc/android/AndroidManifest.xml.
Consider copying it to /home/phil/Projects/metronome/gluon-samples-master/HelloFX/src/android/AndroidManifest.xml before performing any modification
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gvm/android_project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png to /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gensrc/android/res/mipmap-xxhdpi/ic_launcher.png
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gvm/android_project/app/src/main/res/mipmap-xhdpi/ic_launcher.png to /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gensrc/android/res/mipmap-xhdpi/ic_launcher.png
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gvm/android_project/app/src/main/res/mipmap-ldpi/ic_launcher.png to /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gensrc/android/res/mipmap-ldpi/ic_launcher.png
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gvm/android_project/app/src/main/res/mipmap-hdpi/ic_launcher.png to /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gensrc/android/res/mipmap-hdpi/ic_launcher.png
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gvm/android_project/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png to /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gensrc/android/res/mipmap-xxxhdpi/ic_launcher.png
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gvm/android_project/app/src/main/res/mipmap-mdpi/ic_launcher.png to /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gensrc/android/res/mipmap-mdpi/ic_launcher.png
[Sun Sep 19 18:32:37 PDT 2021][INFO] Default Android resources generated in /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/gensrc/android/res.
Consider copying them to /home/phil/Projects/metronome/gluon-samples-master/HelloFX/src/android/res before performing any modification
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/classes/hellofx/styles.css to /tmp/classes12898395628687235771/hellofx/styles.css
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/classes/hellofx/openduke.png to /tmp/classes12898395628687235771/hellofx/openduke.png
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/classes/hellofx/HelloFX.class to /tmp/classes12898395628687235771/hellofx/HelloFX.class
[Sun Sep 19 18:32:37 PDT 2021][FINE] PB Command for jar: /usr/lib/jvm/jdk-15.0.2/bin/jar cf /tmp/classes12898395628687235771/classes.jar -C /tmp/classes12898395628687235771 .
[Sun Sep 19 18:32:37 PDT 2021][FINE] Start process jar...
[Sun Sep 19 18:32:37 PDT 2021][FINE] Result for jar: 0

continuing (log contents)...

[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning for dalvik classes
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/classes/hellofx/styles.css to /tmp/classes12206660029711024470/hellofx/styles.css
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/classes/hellofx/openduke.png to /tmp/classes12206660029711024470/hellofx/openduke.png
[Sun Sep 19 18:32:37 PDT 2021][FINE] Copied resource /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/classes/hellofx/HelloFX.class to /tmp/classes12206660029711024470/hellofx/HelloFX.class
[Sun Sep 19 18:32:37 PDT 2021][FINE] PB Command for jar: /usr/lib/jvm/jdk-15.0.2/bin/jar cf /tmp/classes12206660029711024470/classes.jar -C /tmp/classes12206660029711024470 .
[Sun Sep 19 18:32:37 PDT 2021][FINE] Start process jar...
[Sun Sep 19 18:32:37 PDT 2021][FINE] Result for jar: 0
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-base/16/javafx-base-16-linux.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-base/16/javafx-base-16.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-controls/16/javafx-controls-16-linux.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-controls/16/javafx-controls-16.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-graphics/16/javafx-graphics-16-linux.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /home/phil/.m2/repository/org/openjfx/javafx-graphics/16/javafx-graphics-16.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] Scanning /tmp/classes12206660029711024470/classes.jar
[Sun Sep 19 18:32:37 PDT 2021][FINE] PB Command for merge-dalvik-classes: /usr/lib/graalvm-svn-linux-gluon-21.2.0-dev/bin/jar -cvf ../additional_classes.jar .
[Sun Sep 19 18:32:37 PDT 2021][FINE] Start process merge-dalvik-classes...
[Sun Sep 19 18:32:37 PDT 2021][FINE] [SUB] added manifest
[Sun Sep 19 18:32:38 PDT 2021][FINE] Result for merge-dalvik-classes: 0
[Sun Sep 19 18:32:38 PDT 2021][FINE] Processing JavaStatic dependencies at /home/phil/.gluon/substrate/javaStaticSdk/11-ea+10/android-aarch64/labs-staticjdk/lib/static
[Sun Sep 19 18:32:38 PDT 2021][FINE] Processing JavaFXStatic dependencies at /home/phil/.gluon/substrate/javafxStaticSdk/17-ea+14/android-aarch64/sdk/lib
[Sun Sep 19 18:32:38 PDT 2021][INFO] sysroot path not found and will be downloaded.
[Sun Sep 19 18:32:38 PDT 2021][INFO] Downloading Java Static Libs...
[Sun Sep 19 18:32:38 PDT 2021][FINE] Processing zip file: url = https://download2.gluonhq.com/substrate/staticjdk/labs-staticjdk-android-aarch64-gvm-11-ea+10.zip, zip = /home/phil/.gluon/substrate/labs-staticjdk-android-aarch64-gvm-11-ea+10.zip, subDir = javaStaticSdk, levels = [11-ea+10, android-aarch64], md5 = javaStaticSdk-android-aarch64.md5
[Sun Sep 19 18:32:39 PDT 2021][INFO] Java static libs downloaded successfully

continuing (log contents)...

[Sun Sep 19 18:32:39 PDT 2021][INFO] Downloading JavaFX static libs...
[Sun Sep 19 18:32:39 PDT 2021][FINE] Processing zip file: url = https://download2.gluonhq.com/substrate/javafxstaticsdk/openjfx-17-ea+14-android-aarch64-static.zip, zip = /home/phil/.gluon/substrate/openjfx-17-ea+14-android-aarch64-static.zip, subDir = javafxStaticSdk, levels = [17-ea+14, android-aarch64], md5 = javafxStaticSdk-android-aarch64.md5
[Sun Sep 19 18:32:44 PDT 2021][INFO] JavaFX static libs downloaded successfully
[Sun Sep 19 18:32:44 PDT 2021][INFO] Downloading additional libs for Android ...
[Sun Sep 19 18:32:45 PDT 2021][INFO] Additional libs for Android downloaded successfully
[Sun Sep 19 18:32:45 PDT 2021][INFO] Downloading sysroot zip...
[Sun Sep 19 18:32:45 PDT 2021][FINE] Processing zip file: url = https://download2.gluonhq.com/substrate/sysroot/aarch64sysroot-20210424.zip, zip = /home/phil/.gluon/substrate/aarch64sysroot.zip, subDir = sysroot, levels = [], md5 = sysroot-.md5
[Sun Sep 19 18:33:01 PDT 2021][INFO] Sysroot zip downloaded successfully
[Sun Sep 19 18:33:01 PDT 2021][FINE] Setup dependencies done


EDIT (9/20/21) As suggested in the comment, I ran the following cli command: mvn clean -Pandroid gluonfx:build gluonfx:package

The error indicates that the NDK is missing a needed file: /home/phil/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android/bin/objdump

My location /home/phil/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/linux-x86_64/ does not contain the /aarch64-linux-android folder.

I had created the NDK folder by the following steps:

  1. Opened AndroidStudio with an existing tutorial program I had successfully executed and run on my device.

  2. Clicked Tools >> SDK Manager

  3. Navigated to the "SDK Tools" tab

  4. Selected "NDK (Side by side)" checkbox Android Studio is up-to-date.

    Android Studio Arctic Fox | 2020.3.1 Build #AI-203.7717.56.2031.7583922, built on July 26, 2021 Runtime version: 11.0.10+0-b96-7249189 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.4.0-84-generic GC: G1 Young Generation, G1 Old Generation Memory: 1280M Cores: 6 Registry: external.system.auto.import.disabled=true Non-Bundled Plugins: org.jetbrains.kotlin Current Desktop: ubuntu:GNOME

  5. I created an environment variable ANDROID_NDK=~/Android/Sdk/ndk/23.0.7599858

I will now remove this ndk and the environment variables and see if the ndk that is supposedly provided by the gluon plugin from the pom is sufficient. Theory: the NDK from Android Studio that I installed is intercepting or overriding access to the needed file. As this requires that I edit my .bashrc and reboot, I am going to pause here with the editing process and return to report on the outcome.

Following is the console contents for the CLI command run.

phil@UbuntuDesktop:~/Projects/metronome/gluon-samples-master/HelloFX$ mvn clean -Pandroid gluonfx:build gluonfx:package 
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< com.gluonhq.samples:hellofx >---------------------
[INFO] Building HelloFX 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ hellofx ---
[INFO] Deleting /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target
[INFO] 
[INFO] --------------------< com.gluonhq.samples:hellofx >---------------------
[INFO] Building HelloFX 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- gluonfx-maven-plugin:1.0.5:build (default-cli) @ hellofx ---
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< com.gluonhq.samples:hellofx >---------------------
[INFO] Building HelloFX 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] >>> gluonfx-maven-plugin:1.0.5:compile (default-cli) > process-classes @ hellofx >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ hellofx ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ hellofx ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/classes
[INFO] 
[INFO] <<< gluonfx-maven-plugin:1.0.5:compile (default-cli) < process-classes @ hellofx <<<
[INFO] 
[INFO] 
[INFO] --- gluonfx-maven-plugin:1.0.5:compile (default-cli) @ hellofx ---
[Mon Sep 20 13:27:45 PDT 2021][INFO] ==================== COMPILE TASK ====================
             _______  ___      __   __  _______  __    _
            |       ||   |    |  | |  ||       ||  |  | |
            |    ___||   |    |  | |  ||   _   ||   |_| |
            |   | __ |   |    |  |_|  ||  | |  ||       |
            |   ||  ||   |___ |       ||  |_|  ||  _    |
            |   |_| ||       ||       ||       || | |   |
            |_______||_______||_______||_______||_|  |__|

    Access to the latest docs, tips and tricks and more info on
    how to get support? Register your usage of Gluon Substrate now at

    https://gluonhq.com/activate



[Mon Sep 20 13:27:46 PDT 2021][INFO] We will now compile your code for aarch64-linux-android. This may take some time.
java.io.IOException: You specified an android NDK, but it doesn't contain /home/phil/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android/bin/objdump
    at com.gluonhq.substrate.target.AndroidTargetConfiguration.compile(AndroidTargetConfiguration.java:126)
...additional lines omitted.

Solution

  • I was able to get the gluonfx:package command to run successfully after fixing the following errors that were pointed out by @JosePerada in the comments.

    (1) I removed the environment variables to ANDROID_SDK and ANDROID_NDK. Then, from within Android Studio, I went ahead and removed the NDK(Side by side) package that I had configured in earlier, mistakenly thinking it might be of help.

    (2) I changed the value held in GRAALVM_HOME to a subfile of ~/home/ and moved the Graalvm files as well, to match. This was one of several options. The key is that files are downloaded to within this folder, so write privileges are needed. If I leave it in /usr/lib, either sudo or a user with write privileges for the area will need to run the gluonfx:package command. Simplest seem to me to just put it in my user's home area where I already have write privileges.

    Once these changes were done, the following command gave "BUILD_SUCCESS" messages for both gluonfx:build and gluonfx:package.

    OK, on to attempting to install and run the app on my device. I wonder what I will get wrong about this next step.