我将 MUPDF 添加到 android 应用程序中:
(1) http://mupdf.blogspot.com/
(2) http://pastebin.com/YzHUhzE7
当我尝试这样做时:
Intent intent = new Intent(getBaseContext(), ChoosePDFActivity.class);
startActivity(intent);
我明白了:
07-19 05:22:37.255: W/dalvikvm(16084): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/artifex/mupdfdemo/MuPDFCore;
07-19 05:22:37.255: D/AndroidRuntime(16084): Shutting down VM
07-19 05:22:37.255: W/dalvikvm(16084): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
07-19 05:22:37.275: E/AndroidRuntime(16084): FATAL EXCEPTION: main
07-19 05:22:37.275: E/AndroidRuntime(16084): java.lang.ExceptionInInitializerError
07-19 05:22:37.275: E/AndroidRuntime(16084): at com.artifex.mupdfdemo.MuPDFActivity.openFile(MuPDFActivity.java:212)
07-19 05:22:37.275: E/AndroidRuntime(16084): at com.artifex.mupdfdemo.MuPDFActivity.onCreate(MuPDFActivity.java:311)
07-19 05:22:37.275: E/AndroidRuntime(16084): at android.app.Activity.performCreate(Activity.java:5104)
07-19 05:22:37.275: E/AndroidRuntime(16084): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
07-19 05:22:37.275: E/AndroidRuntime(16084): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
07-19 05:22:37.275: E/AndroidRuntime(16084): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
07-19 05:22:37.275: E/AndroidRuntime(16084): at android.app.ActivityThread.access$600(ActivityThread.java:141)
07-19 05:22:37.275: E/AndroidRuntime(16084): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
07-19 05:22:37.275: E/AndroidRuntime(16084): at android.os.Handler.dispatchMessage(Handler.java:99)
07-19 05:22:37.275: E/AndroidRuntime(16084): at android.os.Looper.loop(Looper.java:137)
07-19 05:22:37.275: E/AndroidRuntime(16084): at android.app.ActivityThread.main(ActivityThread.java:5041)
07-19 05:22:37.275: E/AndroidRuntime(16084): at java.lang.reflect.Method.invokeNative(Native Method)
07-19 05:22:37.275: E/AndroidRuntime(16084): at java.lang.reflect.Method.invoke(Method.java:511)
07-19 05:22:37.275: E/AndroidRuntime(16084): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
07-19 05:22:37.275: E/AndroidRuntime(16084): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
07-19 05:22:37.275: E/AndroidRuntime(16084): at dalvik.system.NativeStart.main(Native Method)
07-19 05:22:37.275: E/AndroidRuntime(16084): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load mupdf from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.example.addingmupdf-2.apk,libraryPath=/data/app-lib/com.example.addingmupdf-2]: findLibrary returned null
07-19 05:22:37.275: E/AndroidRuntime(16084): at java.lang.Runtime.loadLibrary(Runtime.java:365)
07-19 05:22:37.275: E/AndroidRuntime(16084): at java.lang.System.loadLibrary(System.java:535)
07-19 05:22:37.275: E/AndroidRuntime(16084): at com.artifex.mupdfdemo.MuPDFCore.<clinit>(MuPDFCore.java:13)
07-19 05:22:37.275: E/AndroidRuntime(16084): ... 16
有谁知道这里有什么问题?我对任何其他建议持开放态度。将 mupdf 导入现有的 android 项目。