I\'m running unit tests in Android Studio. I have a Java class that loads a native library with the following code
static
{
System.loadLibrary(\"myli
Just make sure, the directory containing the library is contained in the java.library.path
system property.
From the test you could set it before you load the library:
System.setProperty("java.library.path", "... path to the library .../libs/x86");
You can specify the path hard coded, but this will make the project less portable to other environments. So I suggest you build it up programmatically.