Flashdevelop / HaxePunk:构建因错误而停止

我一直在尝试按照 this教程开始使用HaxePunk.我正在使用FlashDevelop,并且在添加logo.png后必须尝试运行该程序.但是,当我运行程序时,我得到以下输出:

Running process: C:\Program Files (x86)\FlashDevelop\Tools\fdbuild\fdbuild.exe "D:\Haxe Projects\Prj_Starting\Prj_Starting.hxproj" -ipc f201d2c5-2ffe-46d4-bb54-c67a3e34ab4a -version "3.2.1" -compiler "C:\Program Files\HaxeToolkit\haxe" -library "C:\Program Files (x86)\FlashDevelop\Library" -target "neko" 
Building Prj_Starting
Running Pre-Build Command Line...
cmd: "C:\Program Files\HaxeToolkit\haxe/haxelib" run lime build "project.xml" neko -debug -Dfdb
[file_contents,C:\Program Files\HaxeToolkit\haxe\lib\lime//.current]
Build halted with errors.
Done(1)

没有给出错误特定错误,所以我不确定是什么问题.我完全按照教程,这些是我的课程:

Main.hx

import com.haxepunk.Engine;
import com.haxepunk.HXP;

class Main extends Engine
{

    override public function init()
    {
#if debug
        HXP.console.enable();
#end
        HXP.scene = new MainScene();
    }

    public static function main() { new Main(); }

}

MainScene.hx

import com.haxepunk.Scene;

class MainScene extends Scene
{
    public override function begin()
    {
        add(new Logo());
    }
}

Logo.hx

package src;
import com.haxepunk.Entity;
import com.haxepunk.graphics.Image;
import com.haxepunk.utils.Input;
import com.haxepunk.utils.Key;

/**
 * Logo entity.
 * @author Abigail Smith
 */
 class Logo extends Entity
{

    private var speed:Int;

    public function new() 
    {
        super(270, 190);
        speed = 5;
        graphic = new Image("graphics/logo.png");
    }

    public override function update():Void {
        if (Input.check(Key.RIGHT)) {
            moveBy(speed, 0);
        }
        if (Input.check(Key.LEFT)) {
            moveBy(-speed, 0);
        }
        if (Input.check(Key.DOWN)) {
            moveBy(0, speed);
        }
        if (Input.check(Key.UP)) {
            moveBy(0, -speed);
        }
    }
}

任何有关解决此错误的帮助将不胜感激.谢谢 :)

最佳答案 看起来你需要一个名为“lime”的库有问题.

[file_contents,C:\Program Files\HaxeToolkit\haxe\lib\lime//.current]

>打开cmd并输入haxelib列表
>检查您是否可以在那里看到石灰库
>如果它在那里然后运行haxelib更新lime,否则你需要通过运行haxelib install lime来安装它

希望这能解决你的问题!

点赞