Robosodium
Robosodium copied to clipboard
64bit library?
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?
Actually I've just found a nice solution:
- Add
android.useDeprecatedNdk=trueto graddle.properties - Edit build.gradle:
android {
...
defaultConfig {
...
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}
}
}
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".
Got a Nexus 5X with 64-bit ARMv8-A. I can test this too.
Some additional resources as to why @luzianscherrer's workaround works:
- https://corbt.com/posts/2015/09/18/mixing-32-and-64bit-dependencies-in-android.html
- http://stackoverflow.com/questions/27186243/use-32-bit-jni-libraries-on-64-bit-android/27202958#27202958
Note also that libsodium 1.11 supports 64-bit Android, in case anyone's interested in authoring a PR :)