I try to build OpenSSL for arm Android as described in this answer. But when I build OpenSSL with "shared" flag, it produces 4 files: libcrypto.so.1.0.0, libssl.so.1.0.0 and 2 symbolic links: libcrypto.so and libssl.so

In Android.mk file I link these libraries to project:

include $(CLEAR_VARS)

LOCAL_MODULE := openssl-ssl

LOCAL_SRC_FILES := libs/libssl.so

include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE := openssl-crypto

LOCAL_SRC_FILES := libs/libcrypto.so

include $(PREBUILT_SHARED_LIBRARY)

But when I try to run my application java.lang.UnsatisfiedLinkError occurs with message "Could not load library libssl.so.1.0.0..."

I tryed to delete links and rename libssl.so.1.0.0 and libcrypto.so.1.0.0 to libssl.so and libcrypto.so respectively but it doesn't help.

How can I use OpenSSL in my project?

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐