问题描述
我在Windows 7和最近突然改变我的开发系统(而不是设备),我坚持与使用后的IntelliJ的的UnsatisfiedLinkError
按<$ C抛出$ C>的System.loadLibrary()加载本地的.so
库
I'm using IntelliJ in Windows 7 and after a recent sudden change to my development system (not device) I'm stuck with the UnsatisfiedLinkError
thrown by System.loadLibrary()
for loading a native .so
library
java.lang.UnsatisfiedLinkError: Couldn't load ... from loader
我想尽弄不好建议对SO,但没有成功,包括:
I tried every fix suggested on SO with no success including:
- 从从头开始重建应用程序,并重新创建模块结构
- 清洁的IntelliJ缓存和重新启动Intellj
我在库我的.so库
文件夹
- 库
- armeabi
- 86
推荐答案
这是不加载
的.so
图书馆是我主要的应用程序。主要的应用是依赖另一个名为模块上X
这在以下层次结构中的.so文件:The
.so
library which was not loading was in my main app. The main app is dependent on another module namedX
which have a .so file in the following hierarchy:- 库
- armeabi-V7A
我注意到,增加这个模块项目prevented要加载主模块本地库。
I've noticed that adding this module to the project prevented main module native libs to be loaded.
似乎有两个
库之间的冲突
文件夹,以便只有疯狂的修复,让两个的.so
文件被装载了重命名armeabi-V7A
文件夹中的模块X要armeabi
,现在一切正常。It seems that there's a conflict between both
libs
folders so the only crazy fix that let both.so
files get loaded was to renamearmeabi-v7a
folder in module X toarmeabi
and now everything is OK.这篇关于的UnsatisfiedLinkError:无法从装载机加载...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!