terl / lazysodium-java

A Java implementation of the Libsodium crypto library. For the lazy dev.
https://github.com/terl/lazysodium-java/wiki
Mozilla Public License 2.0
135 stars 48 forks source link

Getting UnsatisfiedLinkError when I try to init lazySodium #80

Closed KarimFikani closed 4 years ago

KarimFikani commented 4 years ago

Hi,

I'm getting the following exception when I initialize lazySodium in release mode (works fine in debug):

try {
    lazySodium = LazySodiumAndroid(SodiumAndroid())
} catch (e: UnsatisfiedLinkError) {
    Log.e(TAG, "Failed to init lazySodium", e)
    return
}
java.lang.UnsatisfiedLinkError: Can't obtain peer field ID for class com.sun.jna.Pointer
        at com.sun.jna.Native.initIDs(Native Method)
        at com.sun.jna.Native.<clinit>(SourceFile:23)
        at com.sun.jna.Native.H(SourceFile:1)
        at com.goterl.lazycode.lazysodium.c.<init>(SourceFile:4)
        at com.goterl.lazycode.lazysodium.c.<init>(SourceFile:1)

Not sure what could be the problem here.

KarimFikani commented 4 years ago

wrong repo. Meant to post it on lazySodium-android repo