您确定NDK_MODULE_PATH变量已正确定义吗?

时间:2017-09-07 05:48:43

标签: android lua cocos2d-android

创建初始cocos2d Lua项目后,但得到以下bug错误。

错误信息

Android NDK: /Users/beck/Documents/Cocos2d-x/Hello_CocosLua/frameworks/runtime-src/proj.android-studio/app/jni/Android.mk: Cannot find module with tag 'scripting/lua-bindings/proj.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:         
/Users/beck/Documents/Cocos2d-x/Hello_CocosLua/frameworks/runtime-src/proj.android-studio/app/jni/Android.mk:25: *** Android NDK: Aborting.    .  Stop.

2 个答案:

答案 0 :(得分:1)

当主核心版本和扩展版本不匹配时会发生这些错误。不要忘记通过执行python脚本来下载外部扩展; download-deps.py

答案 1 :(得分:0)

通过在Android.mk中添加以下内容进行修复。

旨在导入个别路径" cocos2d-x"," cocos2d-x / external"," cocos2d-x / cocos",正确。

$(调用import-add-path,$(LOCAL_PATH)/../../../../ cocos2d-x)

$(调用import-add-path,$(LOCAL_PATH)/../../../../ cocos2d-x / external)

$(调用import-add-path,$(LOCAL_PATH)/../../../../ cocos2d-x / cocos)