Search code examples
androidsamsung-mobilearm64mupdf

Mupdf lib crash on Samsung Galaxy Edge 6


I have following libs in my project :

Armeabi , Armeabi-v7a , mips , x86 they all have libmupdf.so while Samsung device looking for lib/arm64.

I am getting below crash on Samsung Galaxy Edge 6 .

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.engagebeyond.sasol-1/base.apk"],nativeLibraryDirectories=[/data/app/com.engagebeyond.sasol-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libmupdf.so"
    at java.lang.Runtime.loadLibrary(Runtime.java:366)
    at java.lang.System.loadLibrary(System.java:988)
    at com.artifex.mupdflib.MuPDFCore.<clinit>(MuPDFCore.java:14)
    at com.artifex.mupdflib.MuPDFActivity.openFile(MuPDFActivity.java:233)
    at com.artifex.mupdflib.MuPDFActivity.onCreate(MuPDFActivity.java:445)
    at android.app.Activity.performCreate(Activity.java:6500)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3072)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3218)
    at android.app.ActivityThread.access$1000(ActivityThread.java:198)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1676)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6837)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

Do any one known how i can build lib for arm64 ?


Solution

  • As this phone will run 32bit libraries, one option is to just disable 64 for your application, which will then allow the Armeabi-v7a library to be used.

    The easiest way to do this is using the abiFilter setting, see https://stackoverflow.com/a/30799825/292166