error: passing ‘const AppJniCommand’ as ‘this’ argument discards qualifiers [-fpermissive]

简介: error: passing ‘const AppJniCommand’ as ‘this’ argument discards qualifiers [-fpermissive]

具体错误:


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)
目录
打赏
0
0
0
0
17
分享
相关文章
|
8月前
|
【Python】已解决:TypeError: __init__() got an unexpected keyword argument ‘port’
【Python】已解决:TypeError: __init__() got an unexpected keyword argument ‘port’
1156 0
【Python】已解决:TypeError: __init__() got an unexpected keyword argument ‘port’
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
成功解决TypeError: ‘encoding’ is an invalid keyword argument for this function
|
8月前
|
【Python】已解决:TypeError: *init*() missing 1 required positional argument: ‘scheme’
【Python】已解决:TypeError: *init*() missing 1 required positional argument: ‘scheme’
451 0
【Python】已解决TypeError: init() got an unexpected keyword argument ‘threshold’
【Python】已解决TypeError: init() got an unexpected keyword argument ‘threshold’
429 0
Invalid mapping pattern detected: /download/{{fileName}} ^Not allowed to nest variable c
Invalid mapping pattern detected: /download/{{fileName}} ^Not allowed to nest variable c
Warning: Don’t paste code into the DevTools Console that you don’t understand or haven’t reviewed yo
Warning: Don’t paste code into the DevTools Console that you don’t understand or haven’t reviewed yo
|
10月前
|
gdbusauth.c:1302:11: error: ‘%s’ directive argument is null
gdbusauth.c:1302:11: error: ‘%s’ directive argument is null
283 0
|
10月前
|
完美解决丨File “invalid.py“, line 1 print(`Hello World!`) ^ SyntaxError: invalid syntax
完美解决丨File “invalid.py“, line 1 print(`Hello World!`) ^ SyntaxError: invalid syntax
成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'
成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'
解决办法: error: passing ‘const VideoFrame’ as ‘this’ argument discards qualifiers [-fpermissive]
解决办法: error: passing ‘const VideoFrame’ as ‘this’ argument discards qualifiers [-fpermissive]
252 0

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等