Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnsatisfiedLinkError on Lenovo devices. #19

Open
yev-kanivets opened this issue Oct 2, 2018 · 2 comments
Open

UnsatisfiedLinkError on Lenovo devices. #19

yev-kanivets opened this issue Oct 2, 2018 · 2 comments

Comments

@yev-kanivets
Copy link

Hi, we are getting crashes with following Stack Trace:

Fatal Exception: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.m360.android-2/base.apk"],nativeLibraryDirectories=[/data/app/com.m360.android-2/lib/x86_64, /data/app/com.m360.android-2/base.apk!/lib/x86_64, /vendor/lib64, /system/lib64]]] couldn't find "libbox-jni.so"
       at java.lang.Runtime.loadLibrary(Runtime.java:367)
       at java.lang.System.loadLibrary(System.java:1076)
       at com.box.androidsdk.preview.fragments.BoxPreviewDocumentFragment.<clinit>(BoxPreviewDocumentFragment.java:66)
       at com.box.androidsdk.preview.fragments.BoxPreviewFragment.createInstance(BoxPreviewFragment.java:485)
       at com.box.androidsdk.preview.adapters.PreviewFragmentStatePagerAdapter.getItem(PreviewFragmentStatePagerAdapter.java:42)
       at android.support.v4.app.FragmentStatePagerAdapter.instantiateItem(FragmentStatePagerAdapter.java:109)
       at com.box.androidsdk.preview.adapters.PreviewFragmentStatePagerAdapter.instantiateItem(PreviewFragmentStatePagerAdapter.java:104)
       at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:1004)
       at android.support.v4.view.ViewPager.populate(ViewPager.java:1152)
       at android.support.v4.view.ViewPager.populate(ViewPager.java:1086)
       at android.support.v4.view.ViewPager.setAdapter(ViewPager.java:534)
       at com.box.androidsdk.preview.BoxPreviewViewPager$4.run(BoxPreviewViewPager.java:207)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:5609)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:746)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)

For now this crash happens only on 2 Lenovo devices - "Lenovo YT3-X90F" and "YOGA3 Tablet Pro".

Do you have any ideas why it happens and how it can be fixed?

Thanks in advance :)

@doncung
Copy link
Contributor

doncung commented Nov 7, 2018

I believe this only happens on x86 devices. Our current pdf library is only bundled with a 32 bit library and so if you are using multiple native libraries if one is using a 64 bit library the OS will try to use a nonexistent 64 bit library for our SDK as well.

There is an pdf library change we are evaluating that includes a 64 bit x86 library, but unfortunately also doubles the library size. As such third parties will need to use apk splitting to reduce their apk size if we go with that approach.

This is a stack overflow that discusses the reason and explains a work around involving splitting.
https://stackoverflow.com/questions/34003040/android-multidex-unsatisfiedlinkerror-couldnt-find-so-file

@yev-kanivets
Copy link
Author

@doncung yes, I think you are right. I believe, brand-new App Bundles can be used to resolve the doubling of APK size for third-party applications. They will automatically split .so files into several APKs for each architecture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants