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
I tried every fix suggested on SO with no success including:
- Rebuilding the app and recreating modules structure from scratch
- Cleaning IntelliJ cache and restarting Intellj
I have my .so libraries in the libs
folder
- libs
- armeabi
- x86
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:I've noticed that adding this module to the project prevented main module native libs to be loaded.
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.