How to specify directory for NDK_MODULE_PATH

前端 未结 3 1212
梦毁少年i
梦毁少年i 2020-12-14 02:52

I am having a trouble with this simple task for last couple of hours.

I have ndk-modules directory in root of my Android project and I have following in my Android.m

3条回答
  •  心在旅途
    2020-12-14 03:26

    In my case, I fixed it by realizing NDK searches for:

    $NDK_MODULE_PATH/module_name/Android.mk
    

    But my "module_name" is an Eclipse project where Android.mk is under:

    $NDK_MODULE_PATH/module_name/jni/Android.mk
    

    So NDK cannot find it. I fixed it by:

    1. Move module_name/jni/* to "somewhere/module_name".
    2. In Android.mk:

      $(call import-add-path, /path/to/somewhere)
      $(call import-module,module_name)
      

提交回复
热议问题