Java – Android NDK ndk-build helloJni error

Android NDK ndk-build helloJni error… here is a solution to the problem.

Android NDK ndk-build helloJni error

I’m trying to run the HelloJni program from an NDK sample. I’m using Eclipse Juno. Also, the “.so” file is not generated. But when ndk-build the project, I get the following message in the console:

**** Build of configuration Default for project HelloJni ****

/home/ethics-14/android-ndk/ndk-build all 
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 10 in ./AndroidManifest.xml    
[arm64-v8a] Gdbserver      : [aarch64-linux-android-4.9] libs/arm64-v8a/gdbserver
[arm64-v8a] Gdbsetup       : libs/arm64-v8a/gdb.setup
[x86_64] Gdbserver      : [x86_64-4.9] libs/x86_64/gdbserver
[x86_64] Gdbsetup       : libs/x86_64/gdb.setup
[mips64] Gdbserver      : [mips64el-linux-android-4.9] libs/mips64/gdbserver
[mips64] Gdbsetup       : libs/mips64/gdb.setup
[armeabi-v7a] Gdbserver      : [arm-linux-androideabi-4.8] libs/armeabi-v7a/gdbserver
[armeabi-v7a] Gdbsetup       : libs/armeabi-v7a/gdb.setup
[armeabi] Gdbserver      : [arm-linux-androideabi-4.8] libs/armeabi/gdbserver
[armeabi] Gdbsetup       : libs/armeabi/gdb.setup
[x86] Gdbserver      : [x86-4.8] libs/x86/gdbserver
[x86] Gdbsetup       : libs/x86/gdb.setup
[mips] Gdbserver      : [mipsel-linux-android-4.8] libs/mips/gdbserver
[mips] Gdbsetup       : libs/mips/gdb.setup
[arm64-v8a] Compile        : hello-jni <= hello-jni.c
[arm64-v8a] SharedLibrary  : libhello-jni.so
[arm64-v8a] Install        : libhello-jni.so => libs/arm64-v8a/libhello-jni.so
install: cannot stat `./obj/local/arm64-v8a/libhello-jni.so': No such file or directory
make: *** [libs/arm64-v8a/libhello-jni.so] Error 1

Solution

You seem to be using Android-10 as runtime on your Android-19 device.

Put APP_PLATFORM:= android-10 into your Application.mk file.

Related Problems and Solutions