Skip to content Skip to sidebar Skip to footer

Failed To Create Shared Library Using Android-ndk In Linux?

While trying to create a shared library using android-ndk-r8b it shows the error Your APP_BUILD_SCRIPT points to an unknown file /home/myLib/ndk1/jni/Android.mk Android NDK Abort

Solution 1:

This is a very good tutorial for ndk beginners http://marakana.com/forums/android/examples/49.html

In tutorial : as you are building on android-ndk-r8b replace step which says

go to  your NDK-HOME and  run  make APP=ndk_demo

do this

go to your android project directory and run ndk-build in terminal

Checklist

1) Make sure path NDK path is set

2) Make sure you generated the header file and moved to jni folder

3) You copied appropriate function signature from the header file to your c file this a place people make mistakes while referring to examples they blindly copy the function signature while using some other package name and class name.

JNIEXPORT jint JNICALL Java_com_your_package_class_method(JNIEnv *d, jobject e, jstring f);

4)Make file is present inside your jni folder and contains the correct c file name

5)You are running ndk-build in correct directory ,i.e., project home directory

Solution 2:

try verbose with the "ndk-build".... So you can follow step-by-step what the build is doing with the instructions in the .mk

ndk-build -B V=1

use above for more details ....

Post a Comment for "Failed To Create Shared Library Using Android-ndk In Linux?"