I am trying to call a Java API that accepts ArraList of Strings from JNI
/*My Java Method that needs to be called from JNI*/
public void postArrayListOfStringsToJavaFromJNI(ArrayList<String> list)
{
}
//I am trying to create the methodId like below in JNI to call my Java API postArrayListOfStringsToJavaFromJNI
jmethodID method_id = env->GetMethodID(dmrcallbacks, "postArrayListOfStringsToJavaFromJNI", "(Ljava/lang/Object;)V");
But I am getting an error
11-22 23:22:45.130: E/AndroidRuntime(19189): java.lang.NoSuchMethodError: no method with name='postArrayListOfStringsToJavaFromJNI' signature='(Ljava/lang/Object;)V' in class Lcom/example/JavaSample;
Is there any problem with the GetMethodID call that is having "(Ljava/lang/Object;)V" as first parameter for calling the Java API with parameter "ArrayList"
(Ljava/lang/Object;)V is the signature of a void method taking a single parameter of type java.lang.Object, you presumably need (Ljava/util/ArrayList;)V instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With