我剛剛創建了一個新的項目,cocos2d的-X 2.2.6和NDK r9d,並試圖構建它,並收到以下錯誤:的cocos2d-x NDK本地構建失敗 - 不能執行二進制文件
$ /cygdrive/c/cocos2d-x/cocos2d-x-2.2.6/projects/DSTest/proj.android/build_native.sh
NDK_ROOT = C:\Android\ndk\android-ndk-r9d
COCOS2DX_ROOT = /cygdrive/c/cocos2d-x/cocos2d-x-2.2.6/projects/DSTest/proj.android/../../..
APP_ROOT = /cygdrive/c/cocos2d-x/cocos2d-x-2.2.6/projects/DSTest/proj.android/..
APP_ANDROID_ROOT = /cygdrive/c/cocos2d-x/cocos2d-x-2.2.6/projects/DSTest/proj.android
Using prebuilt externals
make: Entering directory '/cygdrive/c/cocos2d-x/cocos2d-x-2.2.6/projects/DSTest/proj.android'
Android NDK: WARNING:/cygdrive/c/cocos2d-x/cocos2d-x-2.2.6/projects/DSTest/proj.android/../../../cocos2dx/Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries
[armeabi] Compile++ thumb: cocos2dcpp_shared <= main.cpp
/bin/sh: /cygdrive/c/Android/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++: cannot execute binary file: Exec format error
/cygdrive/c/Android/ndk/android-ndk-r9d/build/core/build-binary.mk:393: recipe for target 'obj/local/armeabi/objs/cocos2dcpp_shared/hellocpp/main.o' failed
make: *** [obj/local/armeabi/objs/cocos2dcpp_shared/hellocpp/main.o] Error 126
make: Leaving directory '/cygdrive/c/cocos2d-x/cocos2d-x-2.2.6/projects/DSTest/proj.android'
我已經搜索了上述問題,並重新安裝了ndk和cocos2d-x,但尚未解決問題。
一切都在C盤上。它曾用於構建,但我不確定發生了什麼變化,沒有任何一個cocos2dx 2項目會建立,這就是爲什麼我創建了一個新的測試項目來查看它是否也是如此。我的長期計劃是將項目移至cocos2dx 3.但暫時我只是試圖讓項目再次構建。謝謝 – user5255727