Reputation: 4241
I'm running Ubuntu Linux, and trying to compile native code for Android using the NDK. The contents of my Android.mk file:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := NativeDroid
LOCAL_SRC_FILES := org_me_nativedroid_mJNI.c
include $(BUILD_SHARED_LIBRARY)
Its in the directory of that eclipse project. My native code is in folder NativeDroid/jni, where NativeDroid is the project folder.
(From the command line): and the errors I get
thomas@THOMASDESKLINUX:~/Documents/LinuxProgramming/EclipseWorkspace/Native Droid$ /home/thomas/Documents/LinuxProgramming/Android\ SDKs/android-ndk-r4b/ndk-build
dirname: extra operand `SDKs/android-ndk-r4b/ndk-build'
Try `dirname --help' for more information.
make: /home/thomas/build/core/build-local.mk: No such file or directory
make: *** No rule to make target `/home/thomas/build/core/build-local.mk'. Stop.
Thanks in Advance!, Dragonwrenn
Upvotes: 0
Views: 2933
Reputation: 4241
I finally solved it apparently having spaces in either the parent directories of the NDK and/or having spaces in the Eclipse project will cause ndk-build to fail. strange.
Upvotes: 4