gluonfx:package 教程失败,无法找到 libHelloFX.so

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

我正在阅读 Gluon 提供的文档中的说明:https://docs.gluonhq.com/#platforms_android 并尝试在我的 Ubuntu 桌面 CLI 上执行以下命令:

mvn -Pandroid gluonfx:package

很遗憾,构建失败。以前,我能够 运行 命令 mvn -Pandroid gluonfx:build 成功。 (据我所知,文档中没有给出验证测试,但预期的文件似乎已填充,并且该过程在最后给出了一条 BUILD_SUCCESS 消息)。

抛出的异常表示文件/home/phil/Projects/metronome/gluon-samples-master/HelloFX/target/gluonfx/aarch64-android/libHelloFX.so不存在。事实上,文件夹 /aarch64-android 只包含两个文件夹: gensrcgvm.

我是否忽略了什么或犯了错误?设备通过 USB 连接到 ubuntu 系统。我以前曾成功使用此设备和设置 AndroidStudio。

这是控制台输出(我将其分成几个部分以便于水平滚动):

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 (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
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

继续(控制台输出)...

[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]

以下内容来自日志文件:/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

继续(日志内容)...

[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

继续(日志内容)...

[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

继续(日志内容)...

[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


编辑 (9/20/21) 正如评论中所建议的,我 运行 以下 cli 命令:mvn clean -Pandroid gluonfx:build gluonfx:package

该错误表明 NDK 缺少所需的文件:/home/phil/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android/bin/objdump

我的位置 /home/phil/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/linux-x86_64/ 包含 /aarch64-linux-android 文件夹。

我通过以下步骤创建了 NDK 文件夹:

  1. 打开 AndroidStudio 使用我已成功执行的现有教程程序并在我的设备上 运行。

  2. 单击工具 >> SDK 管理器

  3. 导航到“SDK 工具”选项卡

  4. 选中“NDK(并排)”复选框 Android Studio 是最新的。

    Android 北极狐工作室 | 2020.3.1 Build #AI-203.7717.56.2031.7583922,建于 2021 年 7 月 26 日 运行时版本:11.0.10+0-b96-7249189 amd64 VM:JetBrains 的 OpenJDK 64 位服务器 VM s.r.o。 Linux 5.4.0-84-通用 GC:G1年轻代,G1老年代 内存:1280M 核心数:6 注册表:external.system.auto.import.disabled=true 非捆绑插件:org.jetbrains.kotlin 当前桌面:ubuntu:GNOME

  5. 我创建了一个环境变量ANDROID_NDK=~/Android/Sdk/ndk/23.0.7599858

我现在将删除此 ndk 和环境变量,并查看据称由 pom 中的 gluon 插件提供的 ndk 是否足够。理论:我安装的来自 Android Studio 的 NDK 正在拦截或覆盖对所需文件的访问。由于这需要我编辑我的 .bashrc 并重新启动,我将在此处暂停编辑过程并 return 报告结果。

以下是 CLI 命令 运行 的控制台内容。

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 (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
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 (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
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.

在修复了@JosePerada 在评论中指出的以下错误后,我能够成功地将 gluonfx:package 命令发送到 运行。

(1) 我删除了 ANDROID_SDK 和 ANDROID_NDK 的环境变量。然后,在 Android Studio 中,我继续删除了我之前配置的 NDK(Side by side) 包,错误地认为它可能会有帮助。

(2) 我将 GRAALVM_HOME 中的值更改为 ~/home/ 的子文件,并移动了 Graalvm 文件以进行匹配。这是几个选项之一。关键是文件下载到这个文件夹内,所以需要write权限。如果我将它留在 /usr/libsudo 或对该区域具有写权限的用户将需要 运行 gluonfx:package 命令。在我看来最简单的就是把它放在我已经拥有写权限的用户的主区域。

完成这些更改后,以下命令会为 gluonfx:buildgluonfx:package[ 提供“BUILD_SUCCESS”消息=30=].

好的,开始尝试在我的设备上安装和 运行 该应用程序。我想知道下一步我会犯什么错误。