简体   繁体   English

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

[英]Flashdevelop / HaxePunk: Build halted with errors

I've been trying to follow this tutorial to get started with HaxePunk. 我一直在尝试按照教程开始使用HaxePunk。 I am using FlashDevelop and have got to trying to run the program after adding the logo.png. 我正在使用FlashDevelop,并且在添加logo.png后必须尝试运行该程序。 However, when I run the program I get the following output: 但是,当我运行程序时,我得到以下输出:

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)

No error specific error is given so I am unsure what is wrong. 没有给出错误特定错误,所以我不确定是什么问题。 I have followed the tutorial exactly and these are my classes: 我完全按照教程,这些是我的课程:

Main.hx 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 MainScene.hx

import com.haxepunk.Scene;

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

Logo.hx 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);
        }
    }
}

Any help with this solving this error would be appreciated. 任何有关解决此错误的帮助将不胜感激。 Thank you :) 谢谢 :)

It looks like you have a problem with one of the library you need that called "lime". 看起来你需要一个名为“lime”的库有问题。

[file_contents,C:\Program Files\HaxeToolkit\haxe\lib\lime//.current]
  1. Open cmd and type haxelib list 打开cmd并输入haxelib列表
  2. Check if you can see lime library there 检查你是否可以看到石灰
  3. If it's there then run haxelib update lime else you need to install it by running haxelib install lime 如果它在那里然后运行haxelib更新lime,否则你需要通过运行haxelib install lime来安装它

Hope this solves your problem! 希望这能解决你的问题!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM