Android JNI中的Bogus方法描述符

asl*_*oob 1 java java-native-interface android 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 = len;
    this.cap = cap;
    this.mFzTextChars = mFzTextChars;
}
}
Run Code Online (Sandbox Code Playgroud)

我试图使用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");
Run Code Online (Sandbox Code Playgroud)

我正进入(状态

 Bogus Method Descriptor:        "(Lcom/artifex/mupdf/data/FzRect;II;[Lcom/artifex/mupdf/data/FzTextChar;)V");
Run Code Online (Sandbox Code Playgroud)

use*_*421 6

您的方法签名字符串错误.不要试图猜测这些:javap -s将100%准确地告诉你.