Reputation: 116392
I'm supposed to create an SDK which will be easy to use, so I need it to be in a single jar file. Resources are problematic, but what about including ".so" files, which are NDK-created libraries (usually placed in "libs/armeabi" folder)?
Is it possible to add the ".so" files into the jar file, so that whoever uses the SDK's jar file won't need to add them to his libs folder in his project?
If so, how, and if not, is there any workaround?
To clarify: whoever uses the SDK should only use a single jar file, which will contain all that is needed in order to use the SDK, including the ".so" files.
Note that if I put the libs folder (and the ".so" files in it) into the project that uses the SDK, it works just fine. The same goes if I use the SDK project as an Android project.
Upvotes: 5
Views: 3762
Reputation: 157447
Actually it is what Android
does since ADT 17
has come. As matter of fact, when your create a library project
and you import it in another project, Android
creates a jar file
. This is true for native library
too. Simple when you build your project library, the armeabi
folder will be included in the jar
too.
Upvotes: 3