问题
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