天天看點

cocos2d-x 錯誤整理

一、

Android NDK: jni/Android.mk: Cannot find module with tag 'CocosDenshion/android' in import path    
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?    
Android NDK: The following directories were searched:    
Android NDK:         
jni/Android.mk:19: *** Android NDK: Aborting.    .  Stop.
           
解決方案:在項目 proj.android\jni\Android.mk 檔案中添加路徑:

$(call import-add-path, E:\Research\cocos2d\cocos2d-2.0-x-2.0.2)\
$(call import-add-path, E:\Research\cocos2d\cocos2d-2.0-x-2.0.2\cocos2dx\platform\third_party\android\prebuilt)\

$(call import-module,CocosDenshion/android) \
$(call import-module,cocos2dx) \
$(call import-module,extensions)
           

二、

/usr/bin/bash: /ndk-build:no such file or directory.
           

可能是eclipse沒用設定ndk路徑

三、沒用akp檔案(不一定能解決問題)

在eclipse的Preferences -> Android -> Build中有一項“Skip packaging and dexing until export or launch....”,這個選項預設是被勾選的,暈!這個選項的意思是“跳過packing和dexing,直到export或者launch...”,問題找到了,去掉這個選項即可解決問題。
           

四、NDK_ROOT not defined. Please define NDK_ROOT in your environment解決方案  

在eclipse的Preferences -> C/C++ -> Build->Environment 添加 variable為NDK_ROOT value 為NDK路徑
           
cocos2d-x 錯誤整理

繼續閱讀