cd Documents/workspace/ndkfoo
home of my project
and then i try to run ndk-build command but keeps on getting
ndk-build
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /Users/naveenkumar/workspace/com.gslab.zap:/Users/naveenkumar/Android/android-ndk-r8:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/naveenkumar/Android/android-ndk-r8:/usr/X11/bin:/usr/local/git/bin/jni/Android.mk
i got that APP_BUILD_SCRIPT is pointing to a different place it should be /Users/naveenkumar/Documents/workspace/ndkfoo/jni/Android.mk i am having my Android.mk at this place...
but i dont kw how to change APP_BUILD_SCRIPT to this path :( ,,thnks in advance
my Android.mk is fine ...here is my Android.mk which is under jni folder of project:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
#here we give our module name and source files.
LOCAL_MODULE := ndkfoo
LOCAL_SRC_FILES := ndkfoo.c
include $(BUILD_SHARED_LIBRARY)
and when i run it with NDK_LOG=1 i get the following
NAVEEN-KUMARs-MacBook-Pro:ndkfoo naveenkumar$ /Users/naveenkumar/Downloads/android-ndk-r8/ndk-build NDK_LOG=1
HOST_OS=darwin
HOST_ARCH=x86_64
HOST_TAG=darwin-x86 (no 64-bit prebuilt binaries detected)
GNUMAKE=/Users/naveenkumar/Downloads/android-ndk-r8/prebuilt/darwin-x86/bin/make (NDK prebuilt)
Android NDK: NDK installation path auto-detected: '/Users/naveenkumar/Downloads/android-ndk-r8'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: darwin
Android NDK: Host operating system detected: darwin
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to darwin-x86
Android NDK: Host tools prebuilt directory: /Users/naveenkumar/Downloads/android-ndk-r8/prebuilt/darwin-x86/bin
Android NDK: Host 'echo' tool: echo
Android NDK: Host 'awk' tool: /Users/naveenkumar/Downloads/android-ndk-r8/prebuilt/darwin-x86/bin/awk
Android NDK: Host 'awk' test returned: Pass
Android NDK: This NDK supports the following target architectures and ABIS:
Android NDK: arm: armeabi armeabi-v7a
Android NDK: mips: mips
Android NDK: x86: x86
Android NDK: This NDK supports the following toolchains and target ABIs:
Android NDK: arm-linux-androideabi-4.4.3: armeabi armeabi-v7a
Android NDK: mipsel-linux-android-4.4.3: mips
Android NDK: x86-4.4.3: x86
Android NDK: Found platform root directory: /Users/naveenkumar/Downloads/android-ndk-r8/platforms
Android NDK: Found supported platforms: android-14 android-3 android-4 android-5 android-8 android-9
Android NDK: PLATFORM android-14 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-14/arch-arm
Android NDK: ABI mips sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-14/arch-mips
Android NDK: ABI x86 sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-14/arch-x86
Android NDK: PLATFORM android-3 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-3/arch-arm
Android NDK: ABI mips sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-3/arch-mips
Android NDK: ABI x86 sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-3/arch-x86
Android NDK: PLATFORM android-4 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-4/arch-arm
Android NDK: ABI mips sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-4/arch-mips
Android NDK: ABI x86 sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-4/arch-x86
Android NDK: PLATFORM android-5 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-5/arch-arm
Android NDK: ABI mips sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-5/arch-mips
Android NDK: ABI x86 sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-5/arch-x86
Android NDK: PLATFORM android-8 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-8/arch-arm
Android NDK: ABI mips sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-8/arch-mips
Android NDK: ABI x86 sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-8/arch-x86
Android NDK: PLATFORM android-9 supports: arm mips x86
Android NDK: ABI arm sysroot is: /Users/naveenkumar/Downloads/android-ndk- r8/platforms/android-9/arch-arm
Android NDK: ABI mips sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-9/arch-mips
Android NDK: ABI x86 sysroot is: /Users/naveenkumar/Downloads/android-ndk-r8/platforms/android-9/arch-x86
Android NDK: Found stable platform levels: 14 3 4 5 8 9
Android NDK: Found max platform level: 14
Android NDK: Found project path: /Users/naveenkumar/workspace/com.gslab.zap:/Users/naveenkumar/Android/android-ndk-r8:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/naveenkumar/Android/android-ndk-r8:/usr/X11/bin:/usr/local/git/bin
Android NDK: Ouput path: /Users/naveenkumar/workspace/com.gslab.zap:/Users/naveenkumar/Android/android-ndk-r8:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/naveenkumar/Android/android-ndk-r8:/usr/X11/bin:/usr/local/git/bin/obj
Android NDK: Parsing /Users/naveenkumar/Downloads/android-ndk-r8/build/core/default-application.mk
Android NDK: Defaulted to APP_PLATFORM=android-3
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /Users/naveenkumar/workspace/com.gslab.zap:/Users/naveenkumar/Android/android-ndk-r8:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/naveenkumar/Android/android-ndk-r8:/usr/X11/bin:/usr/local/git/bin/jni/Android.mk
/Users/naveenkumar/Downloads/android-ndk-r8/build/core/add-application.mk:133: *** Android NDK: Aborting... . Stop.
As we can see i am home directory..and still it takes that wrong and also my Application.mk which i put under jni so i tried pasting these three lines in Application.mk
APP_PROJECT_PATH := /Users/naveenkumar/Documents/workspace/ndkfoo
APP_BUILD_SCRIPT := /Users/naveenkumar/Documents/workspace/ndkfoo/jni/Android.mk
APP_MODULES := ndkfoo
The directory structure is as follows: now as i was able to run this once so it is having .o and other libraries that it generates ......
NAVEEN-KUMARs-MacBook-Pro:workspace naveenkumar$ find ndkfoo/ -type f
ndkfoo//.classpath
ndkfoo//.project
ndkfoo//AndroidManifest.xml
ndkfoo//bin/classes/com/gslab/ndkdemo/BuildConfig.class
ndkfoo//bin/classes/com/gslab/ndkdemo/NDKFooActivity.class
ndkfoo//bin/classes/com/gslab/ndkdemo/R$attr.class
ndkfoo//bin/classes/com/gslab/ndkdemo/R$drawable.class
ndkfoo//bin/classes/com/gslab/ndkdemo/R$layout.class
ndkfoo//bin/classes/com/gslab/ndkdemo/R$string.class
ndkfoo//bin/classes/com/gslab/ndkdemo/R.class
ndkfoo//bin/classes.dex
ndkfoo//bin/ndkfoo.apk
ndkfoo//bin/res/drawable-hdpi/icon.png
ndkfoo//bin/res/drawable-ldpi/icon.png
ndkfoo//bin/res/drawable-mdpi/icon.png
ndkfoo//bin/resources.ap_
ndkfoo//gen/com/gslab/ndkdemo/BuildConfig.java
ndkfoo//gen/com/gslab/ndkdemo/R.java
ndkfoo//jni/Android.mk
ndkfoo//jni/Application.mk
ndkfoo//jni/ndkfoo.c
ndkfoo//libs/armeabi/libndkfoo.so
ndkfoo//obj/local/armeabi/libndkfoo.so
ndkfoo//obj/local/armeabi/objs/ndkfoo/ndkfoo.o
ndkfoo//obj/local/armeabi/objs/ndkfoo/ndkfoo.o.d
ndkfoo//proguard.cfg
ndkfoo//project.properties
ndkfoo//res/drawable-hdpi/icon.png
ndkfoo//res/drawable-ldpi/icon.png
ndkfoo//res/drawable-mdpi/icon.png
ndkfoo//res/layout/main.xml
ndkfoo//res/values/strings.xml
ndkfoo//src/com/gslab/ndkdemo/NDKFooActivity.java
This is not duplicate of build script not found since I am pointing to the correct build path and cmake is triggered.
quoted from this source: https://groups.google.com/forum/#!topic/android-ndk/HIUR2gL6Xj0
I think you have a similar problem here.