When running the ndk-build command I get the following error:
Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
The contents of my Android.mk file:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := FRE
LOCAL_SRC_FILES := FlashRuntimeExtensions.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := NativeQCAR
LOCAL_SRC_FILES := main.c
LOCAL_SHARED_LIBRARIES := FRE
include $(BUILD_SHARED_LIBRARY)
Adding the following line doesn't help:
NDK_PROJECT_PATH = C:/Users/Wessel/Dropbox/workspace/eclipse/NativeQ
-C
worked for me.You can also use the mac terminal to do this.
You need to follow steps below:
1.Go to folder containing Android.mk
2.Assign the android-ndk path to $NDK_PROJECT_PATH. eg: export NDK_PROJECT_PATH =/home/android-ndk-r8b.
3.Add NDK to $PATH. eg: export PATH=$PATH:/home/android-ndk-r8b.
You can use the following command
Hope this will answer your question.
NDK_PROJECT_PATH
is an environment variable so you don't have to include in theAndroid.mk
file. Isnkd-build
launched in the project directory?For more info read the docs in
docs/HOWTO.html
in the NDK folder where I readSet your ndk builder's working directory could solve your problem as I got the same problem and solved it in this way.
Path: Project Properties -> Builders -> -> Main -> Working Directory