JNI WArning :Method called with exception pending

廉价感情. 提交于 2021-02-11 17:57:31

问题


I have built the app i release mode using proguard.and I am getting this error.

01-20 15:16:37.611: W/dalvikvm(31760): JNI WARNING: JNI method called with exception pending 01-20 15:16:37.611: W/dalvikvm(31760): Pending exception is: 01-20 15:16:37.616: W/System.err(31760): java.lang.RuntimeException: Stub

When i build apk in normal way it works on my device but following release mode it does not work.


回答1:


The documentation states

You must not call most JNI functions while an exception is pending. Your code is expected to notice the exception (via the function's return value, ExceptionCheck, or ExceptionOccurred) and return, or clear the exception and handle it.

You need to add error checking in your code.



来源:https://stackoverflow.com/questions/21230724/jni-warning-method-called-with-exception-pending

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!