If you directly place a XXX. So file in/libs/armeabi in a jar file and export it as a jar package, such as A. jar,
In an androidProgramTo reference this A. jar file, the following error occurs during compilation:
The library 'a. jar' contains native libraries that will not run on the device. The following libraries were found:-libs/armeabi/libxxx. So
I searched the internet and found no solution.
You can only use the following method:
1. For example, iflytek (/MSC/assets/lib/MSC. Jet: the first four bytes of the file are. Elf, and the class is a JNI function at the end of the file.
Directly change the. So file to an extension, put it in assert, export it to jar, and copy it
Manually load the so library file under the directory of the calling program
2. Put the. So file in jar directly under/libs/armeabi of the target program.
(The. So file mentioned above is for the ARM architecture. If it is x86, change the corresponding directory above to the/libs/x86/directory)
In short, when Android Package A project into a jar package, it is best to include onlySource codeIn addition, it can contain some files, such as assert or the number of custom files,
However, do not protect resource files (the content of all files under/RES should not be placed in the jar package ).