So I have finally wrote entire process here to integrate pdf into android application.
Android MuPDF Error
-
03-06-2022 - |
Domanda
Im adding MUPDF to android app doing :
(1) http://mupdf.blogspot.com/
(2) http://pastebin.com/YzHUhzE7
when i try to do :
Intent intent = new Intent(getBaseContext(), ChoosePDFActivity.class);
startActivity(intent);
I get this :
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
Does anyone know what wrong here? I'm open to any other sugg. to import mupdf to existing android project.
Soluzione
Altri suggerimenti
Looks like you're trying to run the app in the emulator,check the CPU/EBI o match the architecture used in Application.mk
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow