问题描述
我想汇编了cocos2d-X开发的Android原生应用程序。当我尝试调试应用程序,我得到了下面的错误。
的Android NDK:JNI / Android.mk:无法找到标签模块CocosDenshion / Android的进口路径
Android的NDK:你确定你的NDK_MODULE_PATH变量正确定义?
Android的NDK:下面的目录进行了全面搜查:
我在android.mk文件中以下行
$(呼叫进口增加路径,$(LOCAL_PATH)/../../../ CocosDenshion /机器人)
LOCAL_WHOLE_STATIC_LIBRARIES:= cocos2dx_static cocosdenshion_static
包括$(BUILD_SHARED_LIBRARY)
$(呼叫进口模块,CocosDenshion /机器人)
$(呼叫进口模块,cocos2dx)
在我build_native.sh的NDK_MODULE_PATH被定义为
<$p$p><$c$c>"NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos2dx/platform/third_party/android/$p$pbuilt"谁能帮我解决这个问题。
我有同样的问题,前一段时间当我在eclipse中定义cocos2dx变量它建立这样的错误NDK模块路径发生时,没有看到它
然后我尝试设置模块路径硬codeD没有变,它的工作所以我的NDK模块路径是这样的,在Eclipse还定义ndk_root
如果[[$ buildexternalsfromsource]];然后
回声建立从源头外部依赖
$ NDK_ROOT/ NDK建造-C$ APP_ANDROID_ROOT$ * \
"NDK_MODULE_PATH=/home/myname/adt/cocos2dx:/home/myname/adt/cocos2dx/cocos2dx/platform/third_party/android/source"
这是它的外观在我的Windows PC试试看
如果[[$ buildexternalsfromsource]];然后 回声建立从源头外部依赖 $ NDK_ROOT/ NDK建造-C$ APP_ANDROID_ROOT$ * \ "NDK_MODULE_PATH=/cygdrive/c/Users/metin/Desktop/cocos2dx:/cygdrive/c/Users/metin/Desktop/cocos2dx/cocos2dx/platform/third_party/android/source" 其他 回声使用prebuilt外部 $ NDK_ROOT/ NDK建造-C$ APP_ANDROID_ROOT$ * \ "NDK_MODULE_PATH=/cygdrive/c/Users/metin/Desktop/cocos2dx:/cygdrive/c/Users/metin/Desktop/cocos2dx/cocos2dx/platform/third_party/android/$p$pbuilt" 网络
下面是我的Android.mk
LOCAL_WHOLE_STATIC_LIBRARIES:= cocos2dx_static cocosdenshion_static cocos_extension_static LOCAL_WHOLE_STATIC_LIBRARIES + = chipmunk_static 包括$(BUILD_SHARED_LIBRARY) $(呼叫进口附加路径/ cygdrive / C /用户/倚天/桌面/ cocos2dx) $(呼叫进口附加路径/ cygdrive / C /用户/倚天/桌面/ cocos2dx / cocos2dx /平台/ third_party /安卓/ prebuilt) $(呼叫进口模块,CocosDenshion /机器人) $(呼叫进口模块,cocos2dx) $(呼叫进口模块,外部/花栗鼠) $(呼叫进口模块,扩展)
I am trying to compile Android native application developed on cocos2d-x. When i Try to debug my application i get the following error.
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:
I have the following lines in my android.mk file
$(Call import-add-path, $(LOCAL_PATH)/../../../CocosDenshion/android)
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static
include $(BUILD_SHARED_LIBRARY)
$(call import-module,CocosDenshion/android)
$(call import-module,cocos2dx)
In my build_native.sh The NDK_MODULE_PATH is defined as
"NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos2dx/platform/third_party/android/prebuilt"
Can anyone help me solve this issue.
I was having the same problem a while agowhen I define cocos2dx variable in eclipse it didn't see it when building so the error ndk module path occured
Then I tried setting the module path hard coded without variable and it workedso my ndk module path looks like this, also defined ndk_root in eclipse
if [[ "$buildexternalsfromsource" ]]; then
echo "Building external dependencies from source"
"$NDK_ROOT"/ndk-build -C "$APP_ANDROID_ROOT" $* \
"NDK_MODULE_PATH=/home/myname/adt/cocos2dx:/home/myname/adt/cocos2dx/cocos2dx/platform/third_party/android/source"
This is how it looks in my windows pc give it a try
if [[ "$buildexternalsfromsource" ]]; then echo "Building external dependencies from source" "$NDK_ROOT"/ndk-build -C "$APP_ANDROID_ROOT" $* \ "NDK_MODULE_PATH=/cygdrive/c/Users/metin/Desktop/cocos2dx:/cygdrive/c/Users/metin/Desktop/cocos2dx/cocos2dx/platform/third_party/android/source" else echo "Using prebuilt externals" "$NDK_ROOT"/ndk-build -C "$APP_ANDROID_ROOT" $* \ "NDK_MODULE_PATH=/cygdrive/c/Users/metin/Desktop/cocos2dx:/cygdrive/c/Users/metin/Desktop/cocos2dx/cocos2dx/platform/third_party/android/prebuilt" fi
Here is my Android.mk
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static cocos_extension_static LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static include $(BUILD_SHARED_LIBRARY) $(call import-add-path, /cygdrive/c/Users/metin/Desktop/cocos2dx) $(call import-add-path, /cygdrive/c/Users/metin/Desktop/cocos2dx/cocos2dx/platform/third_party/android/prebuilt) $(call import-module,CocosDenshion/android) $(call import-module,cocos2dx) $(call import-module,external/chipmunk) $(call import-module,extensions)
这篇关于&QUOT;在导入路径和QUOT无法找到标签模块“CocosDenshion / Android的;在cocos2dx应用程序错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!