I have a library using native functions (JNI) for working with a serial port. Everything worked fine in Linux and Windows. When connecting JAR as a dependency on Android, when you first access the native function, you receive an error in calling the method, the reason being java.lang.UnsatisfiedLinkError .

I understand that the android requires either recompiling .so and .dll from the sources, or simply calling System.loadLibrary ("serial"); somewhere in the static block.

The second thing that, as I understand it, it is important to correctly set the parameters in the Android.mk and Application.mk files. of type there all external native modules should be described. In which case in which folders to create them? What to write in them? This and this looked, understood nothing.

    0