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:
public class MyService extends Service{
static {
System.loadLibrary("mylib");
}
private native void example();
}
and it gives me an error "Cannot resolve corresponding JNI function Java_com_company_app_MyService_example".
If I run this command (in a terminal)
arm-linux-androideabi-nm -DC mylib.so
I get, between others (I need only few functions of the library),
register_com_company_app_service(_JNIEnv*)
(instead of MyService there is service)
What can I do? Are there problems loading the library or what else?
I tried also to refractor class name "MyService" in "service" but "Java_com_company_app_service_example" wasn't resolved either!
Thanks in advance!