英文:
Kotlin multiplatform build desktopApp failure
问题
当我运行 :desktopApp:packageDistributionForCurrentOS 时,它失败了。
控制台日志:
> 任务 :desktopApp:createRuntimeImage 失败
> 外部工具执行失败:
- 命令:[C:\Program Files\Android\Android Studio\jbr\bin\jlink.exe, @C:\Android\Project\desktopApp\build\compose\tmp\createRuntimeImage.args.txt]
- 工作目录:[]
- 退出码:2
- 标准输出日志:C:\Android\Project\desktopApp\build\compose\logs\createRuntimeImage\jlink-2023-06-26-13-28-38-out.txt
- 错误日志:C:\Android\Project\desktopApp\build\compose\logs\createRuntimeImage\jlink-2023-06-26-13-28-38-err.txt
标准输出文件:
错误:未指定 --module-path,且此运行时映像不包含 jmods 目录。
用法:jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
使用 --help 以获取可能选项列表
错误日志文件为空。
Kotlin: 1.8.20
Compose-multiplatform: 1.4.0
Gradle: 8.0
我尝试过清理和重新构建项目,但问题仍然存在。
英文:
When I run the :desktopApp:packageDistributionForCurrentOS it fails.
Console log:
> Task :desktopApp:createRuntimeImage FAILED
> External tool execution failed:
- Command: [C:\Program Files\Android\Android Studio\jbr\bin\jlink.exe, @C:\Android\Project\desktopApp\build\compose\tmp\createRuntimeImage.args.txt]
- Working dir: []
- Exit code: 2
- Standard output log: C:\Android\Project\desktopApp\build\compose\logs\createRuntimeImage\jlink-2023-06-26-13-28-38-out.txt
- Error log: C:\Android\Project\desktopApp\build\compose\logs\createRuntimeImage\jlink-2023-06-26-13-28-38-err.txt
Standard output file:
Error: --module-path is not specified and this runtime image does not contain jmods directory.
Usage: jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
Use --help for a list of possible options
Error log file is empty.
Kotlin: 1.8.20
Compose-multiplatform: 1.4.0
Gradle: 8.0
I tried to clean and rebuild the project but the problem still exists.
答案1
得分: 2
我有类似的问题,我通过更改Java分发版本来解决它。我遇到了RedHat 17.0.7(与Fedora捆绑)的OpenJDK问题,然后转到了Eclipse Temurin发布的版本(17.0.8)。不确定你是否仍然遇到这个问题,但我留下这个答案,以供其他人遇到类似问题时参考,也许可以帮助。
我知道你在使用Windows,但也许在jbr jdk版本中存在类似的问题。
英文:
I have similar problem, I solved it changing Java distribution.
I have the problem with OpenJDK from RedHat 17.0.7 (packaged with Fedora) and move to Eclipse Temurin release (17.0.8). Not sure if you still have the problem, but I leave this answer it for someone else has similar issue and maybe can help.
I know that you are on Windows, but maybe is a similar issue in jbr jdk version.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论