[英]How do I use APV PDF Viewer
So I want to view PDFs in my app and I've come across APV PDF, but I just can't understand the instructions on how to use it所以我想在我的应用程序中查看 PDF,我遇到了 APV PDF,但我无法理解如何使用它的说明
http://code.google.com/p/apv/wiki/Building http://code.google.com/p/apv/wiki/Building
Why isn't it a jar library to download?为什么不是jar库下载呢?
Why do I have to compile some.so files, why can't I download them?为什么我要编译一些.so文件,为什么不能下载?
I browsed the source and there is a demo application here:我浏览了源代码,这里有一个演示应用程序:
http://code.google.com/p/apv/source/browse/#hg%2Fpdfview http://code.google.com/p/apv/source/browse/#hg%2Fpdfview
I copied that into eclipse as an Android project and it compiles but I get an error when I run and select a PDF in the compiled app我将其作为 Android 项目复制到 eclipse 中并编译但在运行时出现错误,在编译的应用程序中出现 select PDF
java.lang.UnsatisfiedLinkError: parseFile
I understand this has something to do with what I've asked above, so hopefully I'll get some answers.我知道这与我上面的问题有关,所以希望我能得到一些答案。
This probably has something to do with the NDK which I have no experience with.这可能与我没有经验的 NDK 有关。
My mind has been expanded!我的脑洞扩大了!
1) You can't have a Jar as this is C code, so it is going to run in the NDK therefore the equivalent is a .so
file. 1) 您不能拥有 Jar,因为这是 C 代码,因此它将在 NDK 中运行,因此等同于
.so
文件。
2) I don't know why they don't let you just download an .so
file (as well as having the source) , but it seems this project is just a starter project ie you are expected to take the source and modify it. 2)我不知道他们为什么不让你只下载一个
.so
文件(以及源代码) ,但看起来这个项目只是一个入门项目,即你应该获取源代码并修改它. Therefore if you just had a .so
file you could not do this.因此,如果您只有一个
.so
文件,则无法执行此操作。 Each time you change the source code in /jni/pdfview2
you have to rerun the script build-native.sh
and that will recreate your library ( .so
) files for you!每次更改
/jni/pdfview2
中的源代码时,您都必须重新运行脚本build-native.sh
,这将为您重新创建库 ( .so
) 文件!
I was getting the UnsatisfiedLinkError
as the .so
library I was using was built against a different version of the code than that which the Java file was trying to reference.我收到
UnsatisfiedLinkError
,因为我使用的.so
库是针对与 Java 文件试图引用的版本不同的代码版本构建的。 Therefore my link was un-satisfied!因此我的链接不满意!
Hazar!危险!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.