【问题标题】:Flashdevelop / HaxePunk: Build halted with errorsFlashdevelop / HaxePunk:构建因错误而停止
【发布时间】:2016-01-28 11:33:25
【问题描述】:

我一直在尝试按照 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);
        }
    }
}

对于解决此错误的任何帮助将不胜感激。谢谢你:)

【问题讨论】:

  • 这个issue 看起来很相似。这个答案对你有用吗?

标签: haxe flashdevelop haxepunk


【解决方案1】:

您需要的一个名为“lime”的库似乎有问题。

[file_contents,C:\Program Files\HaxeToolkit\haxe\lib\lime//.current]
  1. 打开 cmd 并输入 haxelib list
  2. 检查您是否可以在那里看到 lime
  3. 如果存在则运行 haxelib updatelim 否则您需要通过运行 haxelib installlim 来安装它

希望这能解决您的问题!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-09
    • 1970-01-01
    • 2018-06-26
    • 2021-11-02
    相关资源
    最近更新 更多