Search code examples
javaandroidbassbass.dll

Trouble with loading .so library


I have an android project (Inellij IDEA). I've download BASS library from official site and copied content from lib folder to my project folder libs/. But when I try to load it with System.loadLibrary("bass");, it throws an error:

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip
file "/data/app/com.negi.opengltest-1/base.apk"],nativeLibraryDirectories=
[/vendor/lib, /system/lib]]] couldn't find "libbass.so"

What am I doing wrong? Maybe, I need to change gradle config?

upd: the answer is here un4seen.com/forum/?topic=15633.msg110256#msg110256


Solution

  • The following solution is from http://www.un4seen.com/forum/?topic=15633.msg110256#msg110256 :

    1 mkdir lib, then, copy armeabi to lib, the tree should be lib/armeeabi/libbass.so
    2 zip lib directory: $zip -r libbass.zip lib
    3 rename: $mv libbass.zip libbass.jar
    4 copy libbass.jar to YourProject/Youproject/src/main/libs  ("YourProject/Youproject/src/main/" includes AndroidManifests.xml, res, java, libs)
    5 add this line:
         compile fileTree(dir: 'libs', include: '*.jar')
      to your build.gradle---->dependencies