Are you sure your NDK_MODULE_PATH variable is properly defined?

5.2k views Asked by At

After creating an initial cocos2d Lua project, but get the following bug error.

Error info

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

There are 2 answers

0
Beckon On

Fix by add the following into Android.mk.

Aiming to import the individual path "cocos2d-x", "cocos2d-x/external", "cocos2d-x/cocos", rightly.

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

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

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

0
user2617363 On

These error occurs when the main core version and extension version doesn't match. Don't forget to download the external extensions by executing the python script; download-deps.py