Reputation: 3607
I know the difference of the native library between x86 and armeabi-v7a.
However, I found an app containing different jar library in x86 and armeabi-v7a folder. As I know, Java programs are cross-platform or platform independent. So what would be the point with different jars ?
Upvotes: 2
Views: 148
Reputation: 4086
The library probably uses Renderscript or interfaces with the Android NDK in some manner. Once you leave the Java world behind and delve into C/C++ world suddenly your code can become platform dependent when using pre-compiled code.
When using the NDK you have to compile separate version of your code for different architectures when you build and Android will choose the correct one based on the system's architecture. So each jar file will most likely contain pre-compiled code, like CommonsWare mentioned.
edit
Some examples of pre-compiled code:
All these pre-compiled pieces of code are compiled for different architectures into binary files so that they can be run without having to be interpreted first. They are generally accessed from C/C++ code which has not been pre-compiled but lives somewhere within the app that includes the pre-compiled code. It allows key functionality to live in isolation in these binary files.
Upvotes: 3