如图所示,编译出来的obj\local\armeabi\中有libhello-jni.so文件,在libs\下也有这个文件,两个文件大小不一样,obj下得libhello-jni.so为21k,而libs\armeabi下得文件才2k.
一直疑惑obj目录与libs下目录下生成库的区别,android的开发资料写得太差,没有任何说法,在国外论坛里搜到了只言片语。
As part of the build process, the files in the libs folder have been stripped of symbols and debugging information. So you'll want to keep two copies of each of your .so files: One from the libs folder to install on the Android device, and one from the obj folder to install for GDB to get symbols from.
也就是说,libs目录下生成的库是剥离了符号表与调试信息的,而obj下的库是带有调试信息的。