<aside> đ https://mupdf.com/r/Building-Android-MuPDF-Mobile
</aside>
First do these steps, as you would do with any muPDF project:
git submodule update âinit
make generate
Install Android Studio if you havenât already.
Install the latest Android SDK and NDK.
Obtain a copy of libgs.so
, and place it in mupdf/platform/android/viewer/jni
setting FZ_ENABLE_GPRF
(below) enables use of this library.
Now build the old viewer, which produces libmupdf_java32.so
. This library actually contains both the old and new versions of the JNI interface.
ndk-build clean
ndk-build FZ_ENABLE_GPRF=1
Copy the resulting file to the new example app:
mkdir -p ../example/mupdf/libs/armeabi-v7a
rm -f ../example/mupdf/libs/armeabi-v7a/libmupdf_java32.so
cp ./libs/armeabi-v7a/libmupdf_java32.so ../example/mupdf/libs/armeabi-v7a/
Also put a copy of libgs.so
in mupdf/platform/android/example/mupdf/libs/armeabi-v7a/
Open the example project in Android Studio. The first time youâll get a message about syncing the Gradle files, say OK to all of that.
If you see a message about âunregistered VCS root detectedâ, choose Add Root. This will allow you to use git from inside AS.