安装haxe lime错误

问题描述 投票:5回答:2

我最近尝试用haxe / lime开发,我有两件事吓坏了我。 1.我尝试通过此命令安装Lime:

> haxelib install lime
haxelib run lime setup

并在“c:/”中自动安装Lime,我需要将文件移动到“lib”到haxe文件夹。

2.当我在FD中打开Lime项目时,我收到此错误:

> Called from ? line 1
Called from CommandLineTools.hx line 995
Called from CommandLineTools.hx line 23
Called from CommandLineTools.hx line 108
Called from CommandLineTools.hx line 190
Called from platforms/FlashPlatform.hx line 91
Called from /usr/lib/haxe/std/neko/_std/sys/io/File.hx line 30
Uncaught exception - Invalid field access : __s

当我尝试构建项目时,我收到此错误:

> Warning: Could not find template file: flash/hxml
Warning: Could not find template file: flash/haxe
Fatal error: exception Failure("File not found bin/flash/haxe/release.hxml")
Build halted with errors (haxelib.exe).
haxe lime
2个回答
4
投票

对于您的第一个问题,看起来您没有配置haxelib路径。

您可以使用以下命令设置库的路径:haxelib setup

在这里你把路径放在你希望你的lib存储的地方。

并且在安装石灰后不要忘记:haxelib run lime setup就像它被问到的那样。

对于你的FD问题,我想你可以将你的石灰文件夹移动到另一个文件夹。通常,您永远不必将lib移动到另一个文件夹,或者haxe不知道是位置。

如果不是抱歉,我不会使用FD而是隐藏或升华文本。


1
投票

接受的答案对我没有意义所以我决定发布一个适用于我的系统的解决方案。值得注意的是,我使用的是Ubuntu 14.04,而不是Windows。我既不能安装石灰也不能安装openfl。我决定在这里包含openfl详细信息,因为我找不到解决方案。我收到的openfl错误是Uncaught exception - Invalid field access: split

许多论坛建议检查未设置HAXEPATH环境变量。在我的情况下,它没有设置,但我收到了与此处发布的类似的石灰错误。与这些论坛建议的相反,手动导出HAXEPATH变量允许我成功运行lime和openfl设置。

一个网站还提到format lib是必要的,虽然我不确定这是多么真实。如果您能确认或否认,请发表评论。

这是我做的:

Install openfl, lime, and format

haxelib install openfl haxelib install lime haxelib install format

Get the haxelib path, and export it

运行haxelib config将返回当前定义的haxelib存储库路径。如果您尚未定义haxelib repo路径,则可以通过运行haxelib setup来实现。在我的系统上,路径是/usr/share/haxe/lib

导出haxelib路径: export HAXEPATH="`haxelib config`"

Complete the setup

haxelib run lime setup haxelib run openfl setup

Confirm all is working

运行limeopenfl。您应该收到两者的终端欢迎。

我将上面的导出条目添加到我的bashrc文件中,因为这些工具总是要求变量存在于我的环境中。

© www.soinside.com 2019 - 2024. All rights reserved.