0

i have integrated mupdf in my android application and it works flawless in the emulator and device i use but it crashes in release version, after creating signed apk if i click on pdf file to open the app crashes showing the error below

E/UncaughtException: java.lang.NoSuchFieldError: no field with name='globals' signature='J' in class Lcom/artifex/mupdflib/MuPDFCore; at com.artifex.mupdflib.MuPDFCore.openFile(Native Method) at com.artifex.mupdflib.MuPDFCore.(Unknown Source) at com.artifex.mupdflib.MuPDFActivity.a(Unknown Source) at com.artifex.mupdflib.MuPDFActivity.onCreate(Unknown Source) at android.app.Activity.performCreate(Activity.java:5058) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2077) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2151) at android.app.ActivityThread.access$700(ActivityThread.java:139) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5003) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558) at dalvik.system.NativeStart.main(Native Method)

  • Is that the *only* error in the log? Can you put a full adb log on pastebin or similar. – JosephH Oct 21 '16 at 08:11
  • i get this same errors every time and once i put proguard to false..everything works fine..but i want to use proguard for sure..how to overcome this ..i want to use proguard simultaneously with mupdf .. @JosephH – Sureshbabu T Dec 05 '16 at 05:18

1 Answers1

0

Try adding:

-keep class com.artifex.mupdfdemo.** {*;}

to your proguard configuration

JosephH
  • 37,173
  • 19
  • 130
  • 154