Java Android JNI中的伪方法描述符
我有以下Java类Java Android JNI中的伪方法描述符,java,android,java-native-interface,native,Java,Android,Java Native Interface,Native,我有以下Java类 package com.artifex.mupdf.data; public class FzTextSpan { FzRect bbox; int len, cap; FzTextChar[] mFzTextChars; public FzTextSpan(FzRect bbox, int len, int cap, FzTextChar[] mFzTextChars) { super(); this.bbox = bbox; this.len
package com.artifex.mupdf.data;
public class FzTextSpan {
FzRect bbox;
int len, cap;
FzTextChar[] mFzTextChars;
public FzTextSpan(FzRect bbox, int len, int cap, FzTextChar[] mFzTextChars) {
super();
this.bbox = bbox;
this.len = len;
this.cap = cap;
this.mFzTextChars = mFzTextChars;
}
}
我试图使用foll代码从JNI调用构造函数
jclass jFzSpanClass;
jmethodID jFzSpanCtor;
jFzSpanClass = (*env)->FindClass(env, "com/artifex/mupdf/data/FzTextSpan");
if (jFzSpanClass==NULL) return NULL;
jFzSpanCtor = (*env)->GetMethodID(env, jFzSpanClass, "<init>",
"(Lcom/artifex/mupdf/data/FzRect;II;[Lcom/artifex/mupdf/data/FzTextChar;)V");
描述符中还有一个分号:
"(Lcom/artifex/mupdf/data/FzRect;II;[Lcom/artifex/mupdf/data/FzTextChar;)V"
正确的字符串是:
"(Lcom/artifex/mupdf/data/FzRect;II[Lcom/artifex/mupdf/data/FzTextChar;)V"
描述符中还有一个分号:
"(Lcom/artifex/mupdf/data/FzRect;II;[Lcom/artifex/mupdf/data/FzTextChar;)V"
正确的字符串是:
"(Lcom/artifex/mupdf/data/FzRect;II[Lcom/artifex/mupdf/data/FzTextChar;)V"
方法签名字符串有误。不要试图猜测这些:javap-s将100%准确地告诉您。您的方法签名字符串有误。不要试图猜测这些:javap-s将100%准确地告诉您。@sladvak更准确地说是包含com的目录中的javap-s com.artifex.mupdf.data.FzTextSpan。@sladvak更准确地说是包含com的目录中的javap-s com.artifex.mupdf.data.FzTextSpan。