Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/388.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Android JNI中的伪方法描述符_Java_Android_Java Native Interface_Native - Fatal编程技术网

Java Android JNI中的伪方法描述符

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

我有以下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 = 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。