Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android ndk no rule to make target

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.

like image 385
Jono Brogan Avatar asked Feb 12 '14 11:02

Jono Brogan


2 Answers

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".

like image 180
eozgonul Avatar answered Sep 18 '22 06:09

eozgonul


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.

like image 23
Alex Cohn Avatar answered Sep 20 '22 06:09

Alex Cohn