Q:
I have a question about PDFTron PDF Android Library.
I get the following error when integrating the lib in my app.
12-15 11:12:56.904: E/AndroidRuntime(372): Caused by: java.lang.UnsatisfiedLinkError: Library PDFNetC not found
12-15 11:12:56.904: E/AndroidRuntime(372): at java.lang.Runtime.loadLibrary(Runtime.java:466)
12-15 11:12:56.904: E/AndroidRuntime(372): at java.lang.System.loadLibrary(System.java:557)
12-15 11:12:56.904: E/AndroidRuntime(372): at pdftron.PDF.PDFNet.(SourceFile:22)
A: It looks like you didn’t copy the native library/libraries to the project’s “libs” folder; so the runtime complains about it.
To run a sample project, copy ‘Lib/PDFNet.jar (armeabi/libPDFNetC.so) (armeabi-v7a/libPDFNetC.so)’ to the sample’s ‘libs’ folder, respectively.
Note that you may copy both the native libraries under ‘armeabi’ and ‘armeabi-v7a’ to make the output apk both arm v6 and v7 compatible. Android will load the proper library during installation. If you know what arm structure is targeted, you only need to copy one library and remember to DELETE the other empty folder so that Android won’t get confused.