I realise this question has been asked before but no answers have been able to solve my problem.
I'm trying to build a sample android app provided with NDK which has the following Android.mk file:
LOCAL_PATH := $(call my-dir)
MY_PATH := $(LOCAL_PATH)
include $(call all-subdir-makefiles)
include $(CLEAR_VARS)
LOCAL_PATH := $(MY_PATH)
LOCAL_MODULE := native-activity
LOCAL_SRC_FILES := main.c
LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv1_CM
LOCAL_STATIC_LIBRARIES := android_native_app_glue
include $(BUILD_SHARED_LIBRARY)
$(call import-module,android/native_app_glue)
When I build my project I get the follow error:
**** Build of configuration Default for project NativeActivity ****
/Users/Jono/Documents/Development/Android Development/android-ndk-r9c/ndk-build all
usage: dirname path
make: /Users/Jono/build/core/build-local.mk: No such file or directory
make: *** No rule to make target `/Users/Jono/build/core/build-local.mk'. Stop.
**** Build Finished ****
The problem is that it is looking for build files in my root directory, but I'm not really sure what its doing, what files it looking for, where it should be looking and then what I should do to fix it.
You should not use space in your path to NDK. Change the folder name "Android Development" to something with no white space, i.e. "AndroidDevelopment".
NDK may get very unhappy when the directory names have spaces, as your Android Development
. Simply rename the directory to Android_Development
, and don't forget to update the ADT preferences.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With