C++ and JNI - How to pass an array into a jfloatArray

后端 未结 4 658
谎友^
谎友^ 2020-12-19 10:10

I have been messing with my own little project to teach myself the android ndk using c++ and jni but I can\'t figure out how to pass the data from a java float array to the

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-19 10:40

    Instead the older style (above Tae-Sung Shin's code, still works), we should do this nowadays:

    jfloatArray result;
    result = (*env)->NewFloatArray( env, numbers_here );
    

提交回复
热议问题