Android can#39;t load local libcrypto unsatisfied link error(Android cant load local libcrypto unsatisfied link错误)
问题描述
我需要在我的应用程序中运行比操作系统中的更新版本的 openssl.我能够修补和 android 源以编译更新版本,然后提取共享库以在我的应用程序中使用.
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 library to use in my app.
然后,我能够编译并链接我的本机代码,该代码仅需要较新版本的 openssl 中的函数与我的新共享库(较新的 openssl 的补丁有效).
I was then able to compile and link my native code that requires a function only in newer versions of openssl against my new shared library (the patch to a newer openssl worked).
我还能够创建一些按预期工作的 jni 函数,但只要我添加了仅在应用程序本地较新的 openssl 共享库中的函数,我就会收到不满意的链接错误.
I was also able to create a few jni functions that work as expected but as soon as I added in the function that is only in the newer openssl shared library local to the app I get an unsatisfied link error.
我的假设是 libcrypto 和 libssl 的系统版本覆盖了我在/libs/armeabi/libcrypto.so 和/libs/armeabi/libssl.so 中的本地版本 .... 我该如何解决这个问题?
My assumption is that the system version of libcrypto and libssl are overriding my local versions in /libs/armeabi/libcrypto.so and /libs/armeabi/libssl.so .... how to I fix this?
推荐答案
系统已经附带了一个名为 libcrypto
的库,它将在你的库之前被选中.最简单的解决方案是给你的库一个不同的名字,并在你的 System.loadLibrary(...)
调用中使用它.
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.
更新
正如您所指出的,您需要使用新名称重建库,而不仅仅是重命名文件.
As you pointed out, you will need to rebuild the library with the new name, in stead of just renaming the file.
这篇关于Android can't load local libcrypto unsatisfied link错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Android can't load local libcrypto unsatisfied link错误
基础教程推荐
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01