解决 NDK can't find the application directory

解决方法 1

直接将 NDK 工具包拷贝到项目的对应目录下。

解决方法 2

macOS 上遇到问题 “Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it. ”,需要设置3项参数即可解决问题。

NDK_PROJECT_PATH - the location of your project
NDK_APPLICATION_MK - the path of the Application.mk file
APP_BUILD_SCRIPT - the path to the Android.mk file

具体操作步骤如下:

第一步:

在终端执行命令 ndk-build NDK_PROJECT_PATH=/path/to/proj NDK_APPLICATION_MK=/path/to/Application.mk

备注:路径 /path/to/proj,/path/to/Application.mk 根据文件所在的实际位置设置。

第二步:

在 Application.mk 里添加 APP_BUILD_SCRIPT := /path/to/Android.mk

参考文章:NDK can't find the application directory

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。