如何为 NDK_MODULE_PATH 指定目录 [英] How to specify directory for NDK_MODULE_PATH

查看:17
本文介绍了如何为 NDK_MODULE_PATH 指定目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在过去的几个小时里,我在这个简单的任务上遇到了麻烦.

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

我的 Android 项目的根目录中有 ndk-modules 目录,我的 jni 文件夹的 Android.mk 中有以下目录

I have ndk-modules directory in root of my Android project and I have following in my Android.mk of jni folder

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
NDK_MODULE_PATH := $(LOCAL_PATH)/../ndk-modules
...
$(call import-module,mymodule)

当我构建 mk 文件时,我得到了

When I build the mk file, I got

Android NDK: /MyApp/jni/Android.mk: Cannot find module with tag 'mymodule' in import path    
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?    

我在这里做错了什么?如何正确指定路径?

What am I doing wrong here? How can I specify the path correctly?

更新:

规范是正确的.我的模块目录有问题.很抱歉造成混乱.

The specification was right. I had a problem in mymodule directory. Sorry for the confusion.

推荐答案

NDK_MODULE_PATH 必须在您的路径中.我想在我的 Android.mk 文件中指定它,所以我在 import-module 行之前添加了这一行:

NDK_MODULE_PATH must be in your path. I wanted to specify it in my Android.mk file so I added this line before the import-module line:

$(call import-add-path,my_relative_path)

这篇关于如何为 NDK_MODULE_PATH 指定目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆