Comments (5)
Hi thanks for reporting this.
I'm currently working on a fix for this. Up until then use 4.5.1
from lazysodium-android.
Please upgrade to the latest version of the library ASAP @malenalbc. That should fix it.
from lazysodium-android.
JNA with version 5.2.0
works correctly and as intended.
from lazysodium-android.
This is happening to me with version 5.5.0@aar
and version 4.1.0@aar
of the library:
implementation "com.goterl.lazycode:lazysodium-android:4.1.0@aar"
implementation 'net.java.dev.jna:jna:5.5.0@aar'
The stacktrace when running some code:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/darwin/libjnidispatch.jnilib) not found in resource path ([file:/Users/username/Library/Android/sdk/platforms/android-29/android.jar, file:/Users/username/Library/Android/sdk/platforms/android-29/data/res/, file:/Users/username/Project/build/intermediates/javac/debug/classes/, file:/Users/username/Project/build/tmp/kotlin-classes/debug/, file:/Users/username/Project/build/generated/res/resValues/debug/, file:/Users/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-android-extensions-runtime/1.3.61/289bdf25b4886749e040c7a7d3aab8a57f85c631/kotlin-android-extensions-runtime-1.3.61.jar, file:/Users/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.3.61/70dffc5f8ac5ea7c34f30deac5b9d8b1d48af066/kotlin-stdlib-jdk7-1.3.61.jar, file:/Users/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.61/4702105e97f7396ae41b113fdbdc180ec1eb1e36/kotlin-stdlib-1.3.61.jar, file:/Users/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.61/65abb71d5afb850b68be03987b08e2c864ca3110/kotlin-stdlib-common-1.3.61.jar, file:/Users/username/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar, file:/Users/username/.gradle/caches/transforms-2/files-2.1/f5502816b14bb62549b26ad4e2f02a4d/lazysodium-android-4.1.0/jars/classes.jar, file:/Users/username/.gradle/caches/transforms-2/files-2.1/a0c6aecc41384ff6be5d4099b29da256/jna-5.5.0/jars/classes.jar, file:/Users/username/.gradle/caches/transforms-2/files-2.1/a0c6aecc41384ff6be5d4099b29da256/jna-5.5.0/res/, file:/Applications/Android%20Studio.app/Contents/lib/idea_rt.jar])
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1032)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988)
at com.sun.jna.Native.<clinit>(Native.java:195)
at com.goterl.lazycode.lazysodium.SodiumAndroid.<init>(SodiumAndroid.java:37)
at com.goterl.lazycode.lazysodium.SodiumAndroid.<init>(SodiumAndroid.java:17)
Tried downgrading to 5.2.0@aar
but gives the same error.
from lazysodium-android.
For me this worked fine:
implementation "com.goterl:lazysodium-android:5.0.0@aar"
implementation 'net.java.dev.jna:jna:5.8.0@aar'
I suggest trying it out.
Note: use gradle version on canary version of the IDE:
classpath 'com.android.tools.build:gradle:7.0.0-alpha12'
from lazysodium-android.
Related Issues (20)
- What is the benefit of converting to Hex and not keeping it the same as native Sodium? HOT 2
- Getting UnsatisfiedLinkError when I try to init lazySodium HOT 2
- LazySodium compilation from scratch for F-Droid HOT 9
- JNA vulnerabilities HOT 3
- Keygen XCHACHA20_POLY1305_IETF HOT 2
- "Key.fromPlainString" does not works as expected. HOT 2
- Possible future issue of using this repository? HOT 5
- Lazysodium-android was removed from Google Play. HOT 5
- unable to dissolve dependency HOT 3
- file encryption example
- Weird warning when building a release version: "Missing classes detected while running R8." HOT 3
- Decryption not working on real device, but on emulator it works fine HOT 1
- Documentation link in the readme is broken HOT 1
- A getting started link in the wiki is broken HOT 1
- How to import the library HOT 2
- LazySodiumAndroid.cryptoKdfDeriveFromKey() throws an exception if key length exceeds 32 bytes HOT 1
- Base64 import error in Android SDK version below 27 HOT 3
- cryptoAeadAES256GCM is not available
- Native library (com/sun/jna/android-aarch64/libjnidispatch.so) not found in resource path (.) HOT 3
- Misleading readme: the library is NOT complete libsodium for android, it's very limited HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lazysodium-android.