To use MuPDF source code in Android

1.Install Android develop environment,including SDK,NDK,Cygwin.

2.Download MuPDF source code. Uncompress it.

  http://code.google.com/p/mupdf/downloads/list  You can choose mupdf-1.2-source.zip

3.Open the source folder,enter android folder.You can find that the android source code is there, but no library .The libs folder is empty.So you have to compile the library by yourself.

  open mupdf-*.*-source/android/local.properties.sample, save as local.properties, and add the location of sdk.dir.

  cd to mupdf-*.*-source folder,run "make",and you will get the “generated” folder which the project will need.

  I got the following errors when I execute this step.

    

    I noticed that most of the errors are from function "win**",so I think these errors are for Windows system.Besides,the "generated" folder is generated already,so I ignore these errors and move on.

    I believe some problem is with X11.. 

    Use: make NOX11=yes and you should find it works fine.

  cd to mupdf-*.*-source/android folder,run "ndk-build" and you will get the libmupdf.so file in lib(s) folder

    

    ......

    

  ④......

then you android code can run normally.

For details :http://mupdf.com/doc/how-to-build-mupdf-for-android

posted @ 2013-03-18 14:28  Qiengo  阅读(465)  评论(0编辑  收藏  举报