0

I got a project for android from my work to work with a partner. From the partner they provide a library that seems to be made by c++ (native library) and must be installed in our android project, they provide a library folder containing static library files (.a) according to the architecture and also header files (.h)

I've tried various ways using the NDK and CMAKE but it's still very difficult to call the methods in the library and it makes me frustrated.

Is there a perfect solution to use the existing native library that was compiled beforehand into a file with the extension .a and also includes .h?

1 Answers1

0

I see two ways here:

  1. build static library (.so) from that shared library (.a) using Android.mk script, here is some relevant information about it
  2. create JNI bridge and write there code that will connect methods of the shared library with your app (java/kotlin) code but it's also involve using Android.mk script and build static library to use it on app layer
easy_breezy
  • 1,073
  • 7
  • 18