I am trying to follow this
I have declared the JNI function as
JNIEXPORT void JNICALL Java_com_mypackage_myapp_MyJavaClass_Fun(JNIEnv* env, jobject object, jobjectArray stringArray)
And the corresponding Java function in MyJavaClass is declared as:
public native void Fun(String[] strArray);
But its not working for me as I keep getting run time error:
No implementation found for void com.mypackage.myapp.MyJavaClass.Fun(java.lang.String[])
I have also tried declaring Fun as
public native void Fun(List<String> strArray);
And
public native void Fun(ArrayList<String> strArray);
but these also result in same run time error
Fun()in java code.Fun()beforeSystem.loadLibrary()was being called. Thanks @samgak. But I am wondering is there a way to avoid this? Right now theSystem.loadLibrary()is being called inonResume(). Can this be called inonCreate()instead?