Max Max - 5 months ago 37
Java Question

How can I bundle a .so file in a jar?

I'm currently working on a java library (binding) which uses some own written native code. This native code is compiled as a

file for multiple architectures (arm-v7, i686, x86-64, etc).

I know in android you have to create a folder called
with subfolders for each architecture containing the proper
file. Then with an
file and
I can include these files into my code.

However, I have no clue how to include these
files in a normal java project/library. I have read online that
only works for looking through normal files (and not necessarily project files).


You can't have anything other than code in an android .jar file, however, you can have resources in an .aar file.

Android Archive Library (aar) vs standard jar

You will find that the .aar for your library is the redistributable/reusable compiled version of your library.