如何在Android中集成Foxit PDF Reader?

时间:2013-08-01 13:16:56

标签: android pdf-reader foxit

我已按照这些步骤编译Foxit库:

1) Download and install the Eclipse IDE (http://www.eclipse.org/), the Android SDK, ADT plugin for Eclipse, and the Android NDK (http://developer.android.com/sdk/index.html).
a) For Windows use, also download and install Cygwin (http://www.cygwin.com/). During Cygwin setup, make sure to include the “Devel -> make” package.
2) Download the Foxit embedded SDK Package.
3) Extract the Foxit embedded SDK Package to any directory.
4) Place the Foxit embedded SDK library and header files in fpdfemb_android/examples/demos/bin and include directory.
5) Build the NDK layer.
a) Open the Android.mk makefile in fpdfemb_android/examples/demos/demo(like “demo_view”)/jni/ in a text editor and fill in the Foxit library name in the area designated for LOCAL_LDLIBS, dropping the lib prefix:
The demo is shipped as:
LOCAL_LDLIBS +=../bin/# fill in library name here
To add downloaded libfoxit.a from step 2, fill in as:
LOCAL_LDLIBS :=../bin/libfoxit.a
If the library provide is not named “libfoxit.a” please adjust accordingly.
b) Open Cygwin (Windows), or a terminal (Linux based), and navigate to the fpdfemb_android/examples/demos/demo(like “demo_view”) directory. Run “ndk-build –B” to build the NDK/JNI layer.
Example:
me@myStation /myProjectPath/ > ndk-build –B
This assumes that the ndk directory is part of the $PATH environment variable. The command can also be qualified with the path to the NDK directory.

但是后来我在终端收到了这个错误:

Android NDK:警告:jni / Android.mk:fpdfembedsdk:链接器标志中的非系统库:jni /../../ bin / libfoxit.a
Android NDK:这可能会导致错误的构建。尝试使用LOCAL_STATIC_LIBRARIES
Android NDK:或LOCAL_SHARED_LIBRARIES代替列出了图书馆的依赖关系 Android NDK:当前模块
make: * 没有规则来制作目标`-B'。停止。

请告诉我是否有办法解决这个问题?

谢谢。

1 个答案:

答案 0 :(得分:0)

我建议尝试使用Foxit的新款MobilePDF SDK for Android,它将提供您之前尝试过的嵌入式PDF SDK中的大部分功能,但它包含用户界面,可以集成到您的Android中项目很快。

http://www.foxitsdk.com/products/mobile-pdf-sdk/

此SDK取代了Foxit的嵌入式SDK。

相关问题