twystd / tweetnacl-android

TweetNaCl crypto library port to Android
Other
5 stars 2 forks source link

UnsatisfiedLink Error #3

Closed schott12521 closed 6 years ago

schott12521 commented 6 years ago

After importing the project into my project and adding it as a Library and getting it to build, I am now getting an UnsatisfiedLinkError: no tweetnacl in java.library.path. I think I brought the jni/ndk stuff in correctly, but for some reason the library is still not loading. Thanks

twystd commented 6 years ago

Hi,

It sounds like the tweetnacl.so file is possibly in the wrong directory - but the Android Studio build process has changed so much since that project was last updated it's difficult to be sure. Some basic questions:

(or if you like, zip your whole project and I'll see if I can get it to build)

schott12521 commented 6 years ago

It turns out that it was working actually, the problem was just that Android Studio was not able to find the libraries while running a local unit test, which in retrospect makes sense. Thanks for the help! For reference, latest Android Studio, ndk-build, started from scratch but used this project as a separate module and used the included *.mk files.

twystd commented 6 years ago

Nice going!

I seem to remember running into the same problem and that's why the test and benchmark suites are separate projects rather than unit tests.

schott12521 commented 6 years ago

Ahhh my apologies, I was not using those projects, I was just trying to unit test the default project basically. Thanks for the help!