Hey I am trying to set up a android studio project with JNA and libvirt java bindings.
This is what the project structure looks like so far.
however the solution did not work for me
This is being tested not he emulator so far and the arm binaries have not been imported yet.
When trying to use Connect method in the libvirt java bindings I get this error.
There is a very similar post here
11-18 23:54:37.584 4182-4182/com.local.test E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.local.test, PID: 4182
java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/android-x86/libjnidispatch.so) not found in resource path (.)
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1039)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:999)
at com.sun.jna.Native.<clinit>(Native.java:191)
at com.sun.jna.Native.loadLibrary(Native.java:625)
at org.libvirt.jna.Libvirt.<clinit>(Unknown Source)
at org.libvirt.Library.<clinit>(Unknown Source)
at org.libvirt.Connect.<init>(Unknown Source)
at com.local.haris.MainActivity.onCreate(MainActivity.java:34)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Notes: Android studio 3.0 Do not have the c++ SDK installed (didn't think I needed to since I am not compiling binaries) If am unsure if the libvirt java jar works on android. I tried to find information about this but failed to do. If someone could comment on this it would be appreciated.