1.下载 mupdf-1.10a-source(新版本没有android文件夹)
2.安装cygWin
3.使用cygWin命令打开mupdf-1.10a-source根目录 执行make generate
4.设置D:\mupdf-1.10a-source\platform\android\viewer\local.properties.example 中的sdk和ndk路径(ndk使用的r10e版本),将Application.mk中的abi设置为三种架构。
5.执行完成后,打开mupdf-1.10a-source\platform\android\viewer目录 执行ndk-build
注意:在构建armabi架构的so库时,会出现
[armeabi] Compile thumb : mupdfcore <= NotoSans-Regular.c
D:\Cygwin\tmp\NotoSans-Regular-881c60.s: Assembler messages:
D:\Cygwin\tmp\NotoSans-Regular-881c60.s:30: Error: file not found: resources/fonts/noto/NotoSans-Regular.ttf
clang.exe: error: assembler command failed with exit code 1 (use -v to see invocation)
make: *** [/cygdrive/d/android-ndk-r10e/build/core/build-binary.mk:465:obj/local/armeabi/objs/mupdfcore/__/__/__/__/gen
erated/NotoSans-Regular.o] 错误 1
解决方案就是将根目录下的recourse文件夹放到mupdf-1.10a-source\mupdf-1.10a-source\platform\android\viewer目录下再重新执行第5步即可解决