Skip to content Skip to sidebar Skip to footer

Android Can't Load Local Libcrypto Unsatisfied Link Error

I need to run a newer version of openssl in my app than the one that comes in the OS. I was able to patch and android source to compile a newer version and then extract the shared

Solution 1:

The system already ships with a library known as libcrypto, and that will be picked before your library will. The easiest solution is to give your library a different name, and use that in your System.loadLibrary(...) call.

Update

As you pointed out, you will need to rebuild the library with the new name, in stead of just renaming the file.

Solution 2:

Yes JNI is picking up the system versions. It didn't use your patched versions at all. On standalone JVM you would say -Djava.library.path=/libs/armeabi or modify environment variable LD_LIBRARY_PATH. On Android i guess you can either look up the system property java.library.path and put your libs in some known place (but before the folder where the system versions are) or actually modify the property - prepend the path to your local versions. I do have some experience with Android but not specifically with NDK.

Post a Comment for "Android Can't Load Local Libcrypto Unsatisfied Link Error"