Issue
I've been working with OpenSSL version 1.1.1 with Android. Inside my module's CMake I refer to libssl as SHARED and IMPORTED and linking it with module's own library. When STATIC lib is used compilation throws
"Undefined reference to stdin, stderr."
For now, I chose dynamic and compiling is OK, but I got following error on runtime as:
java.lang.UnsatisfiedLinkError: dlopen failed: library "libssl.so" not found.
The object is there and has related function definitions.
Using this for building. Target API level 26 and using NDK version 19.
Maybe I am building with wrong options? compatibility? or should lower target version?
Solution
Target API level 26
"Undefined reference to stdin, stderr."
It looks like openssl is built for 26, but your app is built for something pre-23. See the first bullet under https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md#using-mismatched-prebuilt-libraries
Your minSdkVersion cannot be lower than the maximum minSdkVersion of all your dependencies.
java.lang.UnsatisfiedLinkError: dlopen failed: library "libssl.so" not found.
Looks like you didn't include it in your APK?
Answered By - Dan Albert
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.