JNI 报错

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},
};

你可能感兴趣的:(JNI 报错)