make:*** [obj / local / armeabi / objs / cocos2dcpp_shared / hellocpp / main.o]错误1

时间:2015-03-13 06:00:23

标签: android eclipse android-ndk cocos2d-x cocos2d-x-3.0

我正试图在Android平台上移植cocos2dx游戏。构建项目时,将显示以下消息

Build of configuration Release for project test_pro 

python /Users/itronix/Documents/Rizwan_Projects/cocos2dx_3_2/workspace/test_pro/proj.android/build_native.py -b release all 
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml    
Android NDK: WARNING:jni/../../cocos2d/cocos/./Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries    
Android NDK: WARNING:jni/../../cocos2d/cocos/platform/android/Android.mk:cocos2dxandroid_static: LOCAL_LDLIBS is always ignored for static libraries    
[armeabi] Compile++ thumb: cocos2dcpp_shared <= main.cpp
make: /Users/itronix/Documents/Rizwan_Projects/cocos2dx_3_2/android-ndk-r9d/toolchains/llvm-3.4/prebuilt/darwin-x86/bin/clang++: No such file or directory
make: *** [obj/local/armeabi/objs/cocos2dcpp_shared/hellocpp/main.o] Error 1
make: *** Waiting for unfinished jobs....
The Selected NDK toolchain version was 4.8 !
Traceback (most recent call last):
  File "/Users/itronix/Documents/Rizwan_Projects/cocos2dx_3_2/workspace/test_pro/proj.android/build_native.py", line 159, in <module>
    build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
  File "/Users/itronix/Documents/Rizwan_Projects/cocos2dx_3_2/workspace/test_pro/proj.android/build_native.py", line 146, in build
    do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)
  File "/Users/itronix/Documents/Rizwan_Projects/cocos2dx_3_2/workspace/test_pro/proj.android/build_native.py", line 82, in do_build
    raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
Exception: Build dynamic library for project [ /Users/itronix/Documents/Rizwan_Projects/cocos2dx_3_2/workspace/test_pro/proj.android ] fails!

我正在使用cocos2dx 3.2,NDK r9D,eclipse juno

2 个答案:

答案 0 :(得分:0)

错误说: /Users/itronix/Documents/Rizwan_Projects/cocos2dx_3_2/android-ndk-r9d/toolchains/llvm-3.4/prebuilt/darwin-x86/bin/clang++:没有这样的文件或目录

确保clang ++文件存在,并且您的ndk已正确设置且不丢失任何文件。

答案 1 :(得分:0)

最后问题已解决......如果您遇到同样的问题,可能对您有所帮助。首先从这个链接下载ndk

http://androids.zone/android-ndk/#.VQKVB4GUeh2

然后从命令行而不是eclipse编译项目。

要加入

在您创建的项目的终端goto proj.android文件夹中 并运行此命令

cocos run -p android -j 4