具体错误:
proxy_jni_function.cpp:199:55: error: passing ‘const AppJniCommand’ as ‘this’ argument discards qualifiers [-fpermissive] 199 | jbyte* jdata = pJniCommand->jstringToJbyte(jresult); | ^
错误是奇怪的,原因是简单的,就是多了个const:
static void jstringToJson(jstring jresult, const AppJniCommand* pJniCommand) { jbyte* jdata = pJniCommand->jstringToJbyte(jresult); }
改成:
static void jstringToJson(jstring jresult, AppJniCommand* pJniCommand)