Referencing .so files from an Android library
I've built OpenSSL into an Android Library that I would like to reference from another Android project.
Unfortunately,
- Yes, I do need OpenSSL, as I need to change the behaviour of dependant Android classes not in the public API. (not enough space here)
- My experience with native code is non-existant.
The project is selected as a library in Preferences > Android
This library is referenced from a second Android project
My Questions are these
- How can I reference the .so files in my Android library from Android.mk in my second project so that I can build dependant files there? I'd prefer not to put the .so files directly in my second project - but if that is the only solution I wo开发者_如何学编程uld accept reasons and directions as an answer.
- How should I include/reference the .so file in files I am building in the second project?
Surely, it is something simple.
Thanks in advance.
once you generate (.so) library file, then make a folder in your applitcation's project folder named "libs/armeabi/" put (.so) file in this folder
and in your application write
System.loadLibrary("library_name");
精彩评论