java.lang.UnsatisfiedLinkError: No implementation found due to Library not loading
<p>I am trying out to integrate native written shared library into my app when it says that the .so file in jniLibs and other libraries cannot be loaded.</p>

<p>Here is the C file</p>

<pre><code>#include &lt;string.h&gt;
#include &lt;jni.h&gt;
#include &lt;dummy.h&gt;

JNIEXPORT jstring
Java_com_example_hellojni_HelloJni_DummyInit(JNIEnv*env, jobject thiz) {

    dummy *handle;
    char *msg;
    int rc = dummy_init_from_id("ml", &amp;handle, &amp;msg);
    if (rc == DUMMY_SUCCESS) {
        return (*env)-&gt;NewStringUTF(env, "Init was successful");
    } else {
        return (*env)-&gt;NewStringUTF(env, msg);
    }

}

JNIEXPORT void 
Java_com_example_hellojni_HelloJni_DummySetSymbolsDir(JNIEnv *env, jobject thiz,
                                                      jstring dir) {
    dummy_set_symbols_dir(dir);

}
</code></pre>

<p>Here is the Java file</p>

<pre><code>package com.example.hellojni;

import android.app.Activity;
import android.util.Log;
import android.widget.TextView;
import android.os.Bundle;
import java.io.File;


public class HelloJni extends Activity
{


    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {

        super.onCreate(savedInstanceState);

        File f = new File(getAssets() + "/ml");
        if (f.exists()) try {

            System.out.println("Scheme exists");
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        String dir = f.getPath();

        DummySetSymbolsDir(dir);

        TextView tv = new TextView(this);
        tv.setText(DummyInit());
        setContentView(tv);
    }


    /*** Native Methods ***/
    public native String DummyInit();
    public native void DummySetSymbolsDir(String dir);

    static {
        try {
            System.loadLibrary(("dummy"));
        } catch (UnsatisfiedLinkError e) {
            Log.e("JNI", "Warning:Could not use dummy library");
        }
        try {
            System.loadLibrary("libs/libpthead.so");
        } catch (UnsatisfiedLinkError e) {
            Log.e("JNI", "Warning:Could not use lipthread library");
        }
        try {
            System.loadLibrary("hello-jni");
        } catch (UnsatisfiedLinkError e) {
            Log.e("JNI", "Warning:Could not use hello-jni library");
        }
    }
}
</code></pre>

<p>The exact error is given below</p>

<pre><code>FATAL EXCEPTION: main
Process: com.example.hellojni, PID: 2558
java.lang.UnsatisfiedLinkError: No implementation found for void com.example.hellojni.HelloJni.DummySetSymbolsDir(java.lang.String) (tried Java_com_example_hellojni_HelloJni_DummySetSymbolsDir and Java_com_example_hellojni_HelloJni_DummySetSymbolsDir__Ljava_lang_String_2)
at com.example.hellojni.HelloJni.DummySetSymbolsDir(Native Method)
at com.example.hellojni.HelloJni.onCreate(HelloJni.java:34)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
</code></pre>

<p>The Android.mk file is as follows</p>

<pre><code>LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE    := hello-jni
LOCAL_SRC_FILES := hello-jni.c
include $(BUILD_SHARED_LIBRARY)
</code></pre>

<p>Do let me know if anymore informations are needed.
Thanks.</p>