JNI 报错
2020-04-07 本文已影响0人
夏_0327
Andoird JNI一直调用报错,后来调查发现,方法必须先这样声明。
static JNINativeMethod methods[] {
{"getCall", "([BLcom/csg/powermaint/model/SCall;)I", (void *)Java_com_csg_powermaint_service_Call101Service_getCall},
{"login", "([BI)I", (void *)Java_com_csg_powermaint_service_Call101Service_login},
{"beat", "()[B", (void *)Java_com_csg_powermaint_service_Call101Service_beat},
{"initRTEFlag", "()I", (void *)Java_com_csg_powermaint_service_Call101Service_initRTEFlag},
{"deviceParse", "([BI)I", (void *)Java_com_csg_powermaint_service_Call101Service_deviceParse},
{"device101ActCall", "()[B", (void *)Java_com_csg_powermaint_service_Call101Service_device101ActCall},
{"getCallResult", "()Lcom/csg/powermaint/model/TwoRemote;", (void *)Java_com_csg_powermaint_service_Call101Service_getCallResult},
};