How to use the imported .so library code in Android Studio?

335 Views Asked by At

I added some C libraries in my Android project. According to some guides I found, I just have to create the folders and put the libraries there. According to the guidelines it is not necessary to do anything else.


|--app: 
|--|--src:
|--|--|--main
|--|--|--|--jniLibs
|--|--|--|--|--arm64-v8a
|--|--|--|--|--|—libhiddec.so
|--|--|--|--|--armeabi-v7a
|--|--|--|--|--|—libhiddec.so
|--|--|--|--|--X86
|--|--|--|--|--|--libhiddec.so

In addition, I downloaded the Cmake and NDK in SDK Manager.

I created this class to execute the function that I think is in the library.

public class NativeClass {

    static {
        System.loadLibrary("hiddec");
    }

    public static native int UIDCardToInt(String dato, int numero);
}

When I execute the project the following error appears

java.lang.UnsatisfiedLinkError: dlopen failed: library "libc.so.6" not found
0

There are 0 best solutions below