android ndk - How to properly call static method in java from jni - Stack Overflow

I am trying to pass some initialization values from jni to java.I have been able locate and correctly

I am trying to pass some initialization values from jni to java.

I have been able locate and correctly call the java method from my JNILib Init function but when I try to call it from a different function, the app crashes because it seems that I do not have the current class, method and env pointers. I have tried to store these pointers from my init function to some global variables but this didn't worked.

I am trying to call

env->CallStaticVoidMethod (class, method, jstr);

from a void function different than the jnilibInit function and I am not sure how to retain the pointers.

I haven't been able to find the class or the method from this function.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744936285a4602044.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信