2
votes

I have followed tutorials to implement NDK functionality in a test project. Created jni folder and added .mk and .c file. NDK is linked and the C++ make file has link to ndk-build file in NDK folder.

On building project i am getting this error :-

Build of configuration Default for project HomeTestingNDK **

/home/falooka/adt-bundle-linux-x86-20130917/ndk/ndk-build all Compile thumb : HomeTestingNDK <= native.c

make: /home/falooka/adt-bundle-linux-x86-20130917/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found

make: * [obj/local/armeabi/objs/HomeTestingNDK/native.o] Error 127

Build Finished **

Now the issue is that 'make' is going for arm-linux-androideabi-gcc while this file doesn't exist in the folder and instead there is arm-linux-androideabi-gcc-4.6. Now I am totally struck how to solve this issue after googling for a while now.

Thanks in advance.

1

1 Answers

1
votes

I was able to resolve my issue by following these multiple steps :

1) For some stupid reason, arm-linux-androideabi-gcc was missing in the ndk directory. So i tried re-installing the zip and extracted it inside the home folder instead of my drive to avoid ownership errors. Now file was there and this error was gone !

2) Then i was getting "Android NDK java.lang.UnsatisfiedLinkError: findLibrary returned null" error which had something to do with libraries missing. After reading some posts, it was prominent that the libs/ folder in project directory should have .so files which were not there. I am using OpenCv with my project so i updated the environment links and put explicit path to ndk-build file in 'make' to make sure it finds ndk-build.

3) I also did this : https://stackoverflow.com/a/7646921/1016544

So finally its compiling and shows building of .so files before installing and runs perfectly.