Skip to content
This repository was archived by the owner on Mar 16, 2022. It is now read-only.

64bit library? #8

Open
luzianscherrer opened this issue Feb 18, 2016 · 4 comments
Open

64bit library? #8

luzianscherrer opened this issue Feb 18, 2016 · 4 comments

Comments

@luzianscherrer
Copy link

I'm using your package to integrate libkalium into an Android project and it is working great. But today I've tried to deploy to a Samsung Galaxy S6 and that gives me the following error:

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.my.app-1/base.apk"],nativeLibraryDirectories=[/data/app/com.my.app-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libkaliumjni.so"

Is this a known issue?

@luzianscherrer
Copy link
Author

Actually I've just found a nice solution:

  1. Add android.useDeprecatedNdk=true to graddle.properties
  2. Edit build.gradle:
android {
    ...
    defaultConfig {
        ...
        ndk {
            abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
        }
    }
}

@GerardSoleCa
Copy link
Owner

Hi,

Currently, the only platforms where libsodium is built are armeabi, armeabi-v7a, x86 and mips. That could be the reason why it's failing on Galaxy S6.

I'll try to add support to x64. Stay tuned please, probably I'll require some help in order to test if x64 is working.

Also, thank you for your "hotfix".

@benhylau
Copy link
Contributor

Got a Nexus 5X with 64-bit ARMv8-A. I can test this too.

@capnfabs
Copy link

Some additional resources as to why @luzianscherrer's workaround works:

Note also that libsodium 1.11 supports 64-bit Android, in case anyone's interested in authoring a PR :)

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

No branches or pull requests

4 participants