Http://blog.sina.com.cn/s/blog_4d0afbdb0100m7y7.html
Background: After the. So file compiled in eclipse of the android project is put under libs \ armeabi, The. So file can be packaged into the APK file and installed on the mobile phone after the APK file is installed.The. So file under libs \ armeabi should be decompressed to/data/. Here is the package name of your project (such as com. First. Second)/lib.
Question: I wrote a test Android JNI app ,. so has been put in libs \ armeabi and can be seen from the compiled APK. so has been packaged in (decompress the APK file, which should contain the Lib folder) but in/data/COM. test. there is no corresponding under test/lib. so file
Solution: it turned out to be my. so is not named according to android standard ,. the so name must have the 'lib' prefix. Otherwise, when the APK is decompressed/installed on the mobile phone, the libs \ armeabi files will not be downloaded. so copy to/data/COM. test. test/lib. Originally, the so name I used was jnitest. So. Changed to libjnitest. So and everything went fine.
Supplement:
A) You must remove the Lib prefix system. loadlibrary ("jnitest") when calling with loadlibrary ");
B) when using the load command, you need to write the full path name and cannot remove the Lib prefix. Because it is used as a system for reading common files. load ("/data/COM. test. test/libjnitest. so ");