Cannot resolve corresponding JNI function with .so file
<p>I'm completely new to JNI and I have to use an existing compiled .so file.
The problem is that Android Studio isn't able to find JNI fuctions.
I load my library with a code similiar to this:</p>

<pre><code>public class MyService extends Service{

    static {
        System.loadLibrary("mylib");
    }

    private native void example();

}
</code></pre>

<p>and it gives me an error "Cannot resolve corresponding JNI function Java_com_company_app_MyService_example".</p>

<p>If I run this command (in a terminal)</p>

<pre><code>arm-linux-androideabi-nm -DC mylib.so
</code></pre>

<p>I get, between others (I need only few functions of the library),</p>

<pre><code>register_com_company_app_service(_JNIEnv*)
</code></pre>

<p>(instead of MyService there is service)</p>

<p>What can I do? Are there problems loading the library or what else?</p>

<p>I tried also to refractor class name "MyService" in "service" but "Java_com_company_app_service_example" wasn't resolved either!</p>

<p>Thanks in advance!</p>