欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

解决Please define the NDK_PROJECT_PATH variable to point to it.

程序员文章站 2022-04-02 22:21:03
...

错误信息:

Android NDK: Could not find application project directory !    
Android NDK:  
/custom/android_sdk/ndk-bundle/build/core/build-local.mk:151: *** Android NDK: Aborting    .  Stop.、

 

从build-local.mk来看,是没有定义NDK_PROJECT_PATH

ifndef NDK_PROJECT_PATH
    NDK_PROJECT_PATH := $(call find-project-dir,.,AndroidManifest.xml)
endif
ifndef NDK_PROJECT_PATH
    $(call __ndk_info,Could not find application project directory !)
    $(call __ndk_info,Please define the NDK_PROJECT_PATH variable to point to it.)
    $(call __ndk_error,Aborting)
endif

# Check that there are no spaces in the project path, or bad things will happen
ifneq ($(words $(NDK_PROJECT_PATH)),1)
    $(call __ndk_info,Your Android application project path contains spaces: '$(NDK_PROJECT_PATH)')
    $(call __ndk_info,The Android NDK build cannot work here. Please move your project to a different location.)
    $(call __ndk_error,Aborting.)
endif

解决方法:ndk-build指定PROJECT路径

ndk-build NDK_PROJECT_PATH=. NDK_APPLICATION_MK=Application.mk APP_BUILD_SCRIPT=Android.mk

相关标签: bug