问题
I use NDK at first time and I have a problem, which I can't resolve about two days. I think the issue not unique, and the problem in some small details.
When I try to build example project I keep getting this error message when I try to compile using "ndk-build"
Android.mk
# File: Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
DEV_MODE := on
ifeq ($(DEV_MODE), on)
FLOWER_LIB_PATH := C:/Users/Paul/Desktop/proj/4ward/build/$(TARGET_ARCH_ABI)/bin/libflower.so
PHOTO_MAKER_LIB_PATH := C:\Users\Paul\Desktop\proj\PhotoMaker\build\$(TARGET_ARCH_ABI)\src\PhotoMaker/libPhotoMaker.so
else # end of DEV_MODE = on
FLOWER_LIB_PATH := $(LOCAL_PATH)/../$(TARGET_ARCH_ABI)/libflower.so
PHOTO_MAKER_LIB_PATH := $(LOCAL_PATH)/../$(TARGET_ARCH_ABI)/libPhotoMaker.so
endif # DEV_MODE = off
include $(CLEAR_VARS)
LOCAL_MODULE := flower-prebuilt
LOCAL_SRC_FILES := $(FLOWER_LIB_PATH)
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := photoMaker-prebuilt
LOCAL_SRC_FILES := $(PHOTO_MAKER_LIB_PATH)
include $(PREBUILT_SHARED_LIBRARY)
#######################
include $(CLEAR_VARS)
LOCAL_MODULE := wrapper
LOCAL_SRC_FILES := wrapper_wrap.cxx
LOCAL_LDFLAGS := -llog
LOCAL_CFLAGS := -frtti
LOCAL_SHARED_LIBRARIES := photoMaker-prebuilt flower-prebuilt
LOCAL_SHARED_LIBRARIES += liblog
LOCAL_LDLIBS := -llog
#LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(BUILD_SHARED_LIBRARY)
add.application.mk
# If APP_BUILD_SCRIPT is defined, check that the file exists.
# If undefined, look in $(APP_PROJECT_PATH)/jni/Android.mk
#
APP_BUILD_SCRIPT := $(strip $(APP_BUILD_SCRIPT))
ifdef APP_BUILD_SCRIPT
_build_script := $(strip $(wildcard $(APP_BUILD_SCRIPT)))
ifndef _build_script
$(call __ndk_info,Your APP_BUILD_SCRIPT points to an unknown file: $(APP_BUILD_SCRIPT))
$(call __ndk_error,Aborting...)
endif
APP_BUILD_SCRIPT := $(_build_script)
$(call ndk_log, Using build script $(APP_BUILD_SCRIPT))
else
ifeq (null,$(APP_PROJECT_PATH))
$(call __ndk_info,NDK_PROJECT_PATH==null. Please explicitly set APP_BUILD_SCRIPT.)
$(call __ndk_error,Aborting.)
endif
_build_script := $(strip $(wildcard $(APP_PROJECT_PATH)/jni/Android.mk))
Application.mk
APP_PLATFORM := android-9
NDK_TOOLCHAIN_VERSION := 4.9
APP_ABI := armeabi-v7a arm64-v8a x86
APP_STL := gnustl_shared
APP_CPPFLAGS := -DWITH_LIVENESS -std=c++11 -frtti -fexceptions
#APP_CPPFLAGS := -std=c++11 -frtti -fexceptions
My logs
来源:https://stackoverflow.com/questions/46161873/android-ndk-your-app-build-script-points-to-an-unknown-file-android-mk-process