There is a project on android in java, you need to connect a library library. Connected with the help of the gadget directory jniLibs.srcDirs = ['libs'] Created a class for working with the lib
@SuppressWarnings("JniMissingFunction") public class MyNativeMethods { static { System.loadLibrary("BlaBla"); } public native void test_method(String text); } NDK seriously encountered just now ... Can someone tell me what I'm doing wrong and tell you the way?
Documentation and guides from google somtrel. A lot of information in my head, but there is no clear structure. When the method is called, an initialization error occurs.
at java.lang.Runtime.loadLibrary(Runtime.java:366) at java.lang.System.loadLibrary(System.java:988) at com.google.MyNativeMethods.<clinit>(MyNativeMethods.java:21) at com.google.FooActivity.onStart(FooActivity.java:32) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236) at android.app.Activity.performStart(Activity.java:6006) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) lib format (.a) and not (.so)