“cannot find module with tag 'CocosDenshion/android' in import path” error in cocos2dx app

后端 未结 7 1520
青春惊慌失措
青春惊慌失措 2021-02-18 18:35

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.         


        
7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-18 18:47

    I had the same issue. The problem is, that the NDK_MODULE_PATH is environment variable and Eclipse (4.2) doesn't let you define environment variables for debugging, only for build.

    So defining the NDK_MODULE_PATH variable system-wide is one solution. On Linux you can do it for example by editing your .profile and adding following:

    export NDK_MODULE_PATH="path/to/module"
    

    This solution is permanent, but not flexible.

    Another solution is starting eclipse from command line:

    $ export NDK_MODULE_PATH="path/to/module"
    $ eclipse
    

    This is more flexible and you can do it with simple script. If you change NDK_MODULE_PATH, you only need to restart Eclipse and not whole session.

提交回复
热议问题