【问题标题】:nme haxe, unable to build on android platform with flashdevelopnme haxe,无法使用 flashdevelop 在 android 平台上构建
【发布时间】:2013-02-18 15:56:17
【问题描述】:

我刚刚开始了解 nme haxe 开发,我目前正在使用 flashdevelop。在android平台下构建示例应用程序(piratepig)时遇到问题。很多“没有这样的文件或目录”。当我选择 windows、Html5 或 flash 平台时,一切似乎都很好。

这是输出:



Running process: C:\Program Files (x86)\FlashDevelop\Tools\fdbuild\fdbuild.exe "C:\Users\Valentin\Desktop\PiratePig\Pirate Pig.hxproj" -ipc 2a666e48-3f38-4abd-b63a-25219cb72cf4 -version "2.10" -compiler "C:\Motion-Twin\Haxe" -library "C:\Program Files (x86)\FlashDevelop\Library" -target "android"
Building Pirate Pig
haxelib run nme build C:\Users\Valentin\Desktop\PiratePig\project.nmml android -debug
haxelib run hxcpp Build.xml haxe -Ddebug -Dactuate -Dandroid -Dcpp -Ddebug -Dhaxe_208 -Dhaxe_209 -Dhaxe_210 -Dmobile -Dnme -Dnme_install_tool -Dsys -Dtrue
Creating hxcpp.h.gch...
arm-linux-androideabi-g++ -Iinclude --sysroot=C:\Development\Android NDK/platforms/android-5/arch-arm -IC:\Development\Android NDK/sources/cxx-stl/gnu-libstdc++/include -IC:\Development\Android NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include -DHXCPP_DEBUG -DHXCPP_VISIT_ALLOCS -Dhaxe_210 -IC:\Motion-Twin\Haxe\lib\hxcpp\2,10//include -Iinclude -fpic -fvisibility=hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -D_LINUX_STDDEF_H  -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-limit=10000 -DANDROID -Wa,--noexecstack -O0 -DNDEBUG -c -frtti -o hxcpp.h.gch C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hxcpp.h
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hxcpp.h:13:20: error: typeinfo: No such file or directory
In file included from C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hxcpp.h:170:
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/Array.h:195:21: error: algorithm: No such file or directory
In file included from C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hxcpp.h:162:
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hx/Object.h: In member function 'void hx::ObjectPtr<O>::CastPtr(hx::Object*)':
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hx/Object.h:143: error: must #include <typeinfo> before using typeid
In file included from C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hxcpp.h:170:
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/Array.h: In member function 'void Array_obj<ELEM_>::sort(Dynamic)':
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/Array.h:388: error: 'sort' is not a member of 'std'
In file included from C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hxcpp.h:171:
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/Class.h: In function 'bool hx::TCanCast(hx::Object*)':
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/Class.h:139: error: must #include <typeinfo> before using typeid
Called from ? line 1
Called from BuildTool.hx line 1265
Called from BuildTool.hx line 554
Called from BuildTool.hx line 591
Called from BuildTool.hx line 710
Called from BuildTool.hx line 739
Called from BuildTool.hx line 153
Uncaught exception - Error creating pch: 1 - build cancelled
Error : Build failed
Build halted with errors (haxelib.exe).
Done(1)

有没有人有线索,可能是什么问题?我尝试在 Eclipse 中运行一个简单的 helloworld 应用程序(这样我可以确定它与 haxe 和 nme 相关),但是 helloword 应用程序运行良好。

【问题讨论】:

  • 我不明白日食会证明什么。我会确保您使用最新的 hxcpp 和 nme,尝试使用 haxelib install hxcpp 和 haxelib 升级命令。我还假设您已经运行了 nme setup android 命令?完成后,使用 nme create piratepig 命令创建一个新的海盗猪示例,它将创建一个新文件夹进行测试。

标签: android flashdevelop haxe build-error nme


【解决方案1】:

您使用的是 NME 3.5.3 或更高版本吗? 那么你需要切换到 hxcpp 2.10.3 。它将解决问题。尝试使用此命令通过 haxelib 更新 hxcpp

haxelib 升级

【讨论】:

  • 我不确定版本。在我遇到问题的时候,我使用的是最新版本,但问题以某种方式解决了(见我的回答)
【解决方案2】:

很久以前,通过谷歌的一些点击解决了这个问题。我现在找不到它,但它与 NDK 目录有关,我不得不移动或复制结构中的一些文件。 可能是这样的

据我所知,这与此类似(Andy 在 openfl 上发布的答案):

从 ${ANDROID_NDK_ROOT}\sources\cxx-stl\gnu-libstdc++\4.4.3\ 到 ${ANDROID_NDK_ROOT}\sources\cxx-stl\gnu-libstdc++\

这是他的答案的链接,以及上面的一些类似问题:

http://www.openfl.org/developer/forums/installing-openfl/beginner-questions-android-build-failed/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多