我正在尝试调用一个接受来自 JNI 的 ArraList 字符串的 Java API
/*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");
但我收到一个错误
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;
将“(Ljava/lang/Object;)V”作为第一个参数用于使用参数“ArrayList”调用 Java API 的 GetMethodID 调用是否有任何问题