UnsatisfiedLinkError: Couldn't load … from loader

青春壹個敷衍的年華 提交于 2019-12-11 07:25:13

问题


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

回答1:


The .so library which was not loading was in my main app. The main app is dependent on another module named X which have a .so file in the following hierarchy:

  • libs
    • armeabi-v7a

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 rename armeabi-v7a folder in module X to armeabi and now everything is OK.



来源:https://stackoverflow.com/questions/17650494/unsatisfiedlinkerror-couldnt-load-from-loader

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!