armeabi 和 armeabi-v7a 文件夹 [英] armeabi and armeabi-v7a folder
问题描述
我正在处理一个 Android 项目,我正在使用 NDK 调用本机方法.我有两个库(.so 文件),一个位于 libs/armeabi
文件夹中,另一个位于 libs/armeabi-v7a
lib 文件夹中.
I'm working on an Android project and I am using the NDK to call native methods.
I have two libraries (.so files) and one is located in the libs/armeabi
folder and the other one is located in the libs/armeabi-v7a
lib folder.
如果我尝试运行该应用程序,则它不会加载 /libs/armeabi
文件夹中的库.如果我将库文件移动到 libs/armeabi-v7a
文件夹,那么它会加载库,但在 5 到 10 分钟后它会崩溃并给出分段错误错误.
If I try to run the application then it won't load the library in the /libs/armeabi
folder. If I move the library file to the libs/armeabi-v7a
folder, then it loads the library but after 5 to 10 minutes it crashes and gives a segmentation fault error.
我想知道库的位置(不同的文件夹)是否会导致这个问题.
I was wondering if the location of the library (different folder) might cause this problem.
推荐答案
我自己是新来的,但走着同样的道路......据我所知,一个人可能只有一个 shared 图书馆;要使用多个库,请将它们设为静态并将它们链接到一个共享的库.当然,这假设您是自己构建库;-)
I'm new to this myself, but going the same path... as far as I know, one may only have a single shared library; to use several libraries, make them static and link them together to a single shared one. Of course, this assumes you're building the libraries yourself ;-)
这篇关于armeabi 和 armeabi-v7a 文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!