1. 程式人生 > >解決build/core/build-local.mk:151: *** Android NDK: Aborting

解決build/core/build-local.mk:151: *** Android NDK: Aborting

從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