So I have built this project based on a pdf reader(MuPDF). I used ndk-build for that. The name of this project is ChoosePDFActivity. I know that it has been correctly built
You just have to create a dummy dynamic library that simply links against your static library like this:
https://stackoverflow.com/a/2957386/892714
The ndk build system (unfortunately) will not create a static library without it being used by a dynamic library. Then you simply grab your static library from obj/local/armeabi-v7a.
You do not really need any NDK magic because if your project has no jni/
folder, and if you place the libraries in the libs/
, they will be there. (Just in case, put them under version control; by default .so is usually ignored.)
The most important line in your log is:
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load libmupdf
If your project uses two libraries, you have to load both, in the order that would resolve dependencies.
static {
System.loadLibrary("tools"); // libtools.so
System.loadLibrary("main"); // libmain.so
}
As I understand, you have no linker problems, but just in case I post these links:
Re: How to build an shared library and call it in other ndk program
Android NDK - make two native shared libraries calling each other
Android NDK: Link using a pre-compiled static library