Android MuPDF Error
Asked Answered
E

2

7

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.

Eyeball answered 19/7, 2013 at 5:28 Comment(1)
Did you compiled the C (jni) libs? Have a look here: mupdf.com/doc/how-to-build-mupdf-for-androidScorpion
E
2

So I have finally wrote entire process here to integrate pdf into android application.

Eyeball answered 24/11, 2013 at 22:23 Comment(4)
@A_J What you mean? you cant click it? I just up dated the link.Eyeball
Hi, i followed all the steps you described: dixitpatel.com/integrating-pdf-in-android-application But i get the same error you complained about on the first message, how did you fixed it ?Morava
What do you mean in step 5 of your tutorial "than command: ‘make' "Midinette
Link is dead, Paste code instead of links they became invalid over a timeRichthofen
C
0

Looks like you're trying to run the app in the emulator,check the CPU/EBI o match the architecture used in Application.mk

Correction answered 9/10, 2013 at 7:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.