简体   繁体   English

在Android中删除JNI本地参考表

[英]Delete jni local reference table in android

Hi i have developed android app using phonegap and jquery mobile.when i continuously use my app JNI is crashing my app and closed suddenly. 嗨,我已经使用phonegap和jquery mobile开发了android应用。当我继续使用我的应用时,JNI崩溃了我的应用并突然关闭。

Here is my logcat error: 这是我的logcat错误:

Android : JNI ERROR (app bug): local reference table overflow (max=512)

Please help me to delete the jni local reference table from android. 请帮我从Android删除jni本地引用表。

Here is the link which i referred to delete the JNI local ref table: https://github.com/aclindsa/jnioverhead 这是我引用的删除JNI本地引用表的链接: https : //github.com/aclindsa/jnioverhead

There is an example in the above link and how to delete the jni local reference table from android.I have created .java and .h file like in the link and its not working.Please guide me.Thanks in Advance. 上面的链接中有一个示例,以及如何从android中删除jni本地引用表。我已经在链接中创建了.java和.h文件,但该文件无法正常工作,请指导我。

Use env->PushLocalFrame(capacity) in the start of the JNI call, and delete it with env->PopLocalFrame(NULL). 在JNI调用开始时使用env-> PushLocalFrame(capacity),并通过env-> PopLocalFrame(NULL)删除它。 On the other hand, the phonegap guys should probably fix this in their code. 另一方面,电话空白人员可能应该在其代码中修复此问题。 JNI clears the local ref table once the native method exists. 一旦本机方法存在,JNI就会清除本地引用表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM