开发者

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,

  1. 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)
  2. My experience with native code is non-existant.

Referencing .so files from an Android library

The project is selected as a library in Preferences > Android

Referencing .so files from an Android library

This library is referenced from a second Android project

Referencing .so files from an Android library

My Questions are these

  1. 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.
  2. 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");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜