maty
V2EX  ›  C++

老铁们.你们是用啥写 jni 的?

  •  
  •   maty · Dec 16, 2019 · 3898 views
    This topic created in 2346 days ago, the information mentioned may be changed or developed.

    如题,你们都是用 as 写的 jni 吗? 我感觉用 as 写 jni 会有这么些问题.

    1. 头文件包含偶尔抽风,系统头文件包含都飘红,但是编译却编得过
    2. android 视图下头文件包含 includes 会多出来很多莫名其妙的头文件,展开有时候还会出 bug 似的跳来跳去
    3. 调试加载的时候也忒慢了

    所以想请教各位大大,你们公司是咋做的?

    5 replies    2020-09-19 18:02:44 +08:00
    wutiantong
        1
    wutiantong  
       Dec 17, 2019
    随便拿个编辑器都能写,写到 jni 这一层就是简单封装一层壳而已,没什么好调试的了。
    maty
        2
    maty  
    OP
       Dec 17, 2019 via Android
    @wutiantong 有时候还是要调 C++代码的,这个就和 jni 没多大关系了,as 调 C++加载比较慢
    turi
        3
    turi  
       Dec 18, 2019
    我把 boost 库,protobuf 库 都弄到 jni 了,这显示,太感人。

    写代码效率下降了不止一点点,那提示速度 非常感人。

    用惯了 vs,用 as, 想砸电脑
    maty
        4
    maty  
    OP
       Dec 19, 2019
    @turi 那老哥有想过用啥办法改善一下吗?
    Gloomyer
        5
    Gloomyer  
       Sep 19, 2020
    clion 写 调试 然后跑脚本编译 so
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1245 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 23:37 · PVG 07:37 · LAX 16:37 · JFK 19:37
    ♥ Do have faith in what you're doing.