Android: Connecting *.so Atol libraries to an AndroidStudio project


In the docks, an example of developing an application in Eclipse, everything works. I transfer the project to AndroidStudio, it doesn't work, it can't find libraries from *.so files! I tried all the options, made my own JAR, created a packaging script in Gradle, created a folder and threw *.so libraries there, nothing helps, the same message is always the same:

10-16 13:18:38.030: W/dalvikvm(5101): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/atol/drivers/fptr/IFptrNative;
10-16 13:18:38.030: W/dalvikvm(5101): threadid=1: thread exiting with uncaught exception (group=0x41869438)
10-16 13:18:38.050: E/AndroidRuntime(5101): FATAL EXCEPTION: main
10-16 13:18:38.050: E/AndroidRuntime(5101): java.lang.ExceptionInInitializerError
10-16 13:18:38.050: E/AndroidRuntime(5101):     at com.atol.drivers.fptr.IFptr.create(
10-16 13:18:38.050: E/AndroidRuntime(5101):     at ru.gc986.testprintserver.printlib.printers.Atol_11.<init>(

The error occurs at the moment of creating an object using the library JAR. She, in turn, poke into * .so files, but she cannot find what she needs. Who is to blame and what to do?

The solution was suggested on the Athol website, the object files must be placed in the app/src/main/jniLibs/armeabi folder, and the jar in the app/src/main/libs folder, and only then everything starts working!


You need to put *.so libraries by splitting them by armeabi , mips and x86 platforms into some directory and specify the path to the directory in the gradle script:

android {
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']

It works for me with no issues.

Scroll to Top