1.dr@drBox:~/workspace/JniTest/jni$ ~/android-ndk-r6/ndk-build Compile++ thumb : Test <= JniTest.cpp /bin/sh: /home/dr/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++: not found make: *** [/home/dr/workspace/JniTest/obj/local/armeabi/objs/Test/JniTest.o] Error 127
这个错误是说找不到arm-linux-androideabi-g++,确实找不到,我从ndk r6中发现根本就没有linux-x86/文件夹,只有darwin-x86 gdbserver这两个文件夹,所以下载了最新的ndk r7b,幸好这里面有linux-x86文件夹,编译成功了。
dr@drBox:~/workspace/JniTest/jni$ ~/android-ndk-r7b/ndk-build Compile++ thumb : Test <= JniTest.cpp StaticLibrary : libstdc++.a SharedLibrary : libTest.so Install : libTest.so => libs/armeabi/libTest.so