I have spent some time examining the checkjni mode using an Android emulator with my app. Altough it is written (in http://android-developers.blogspot.com/2011/11/jni-local-reference-changes-in-ics.html) that CheckJNI is on by default if debuggable="true" & targetSdkVersion is at least Ice Cream Sandwich (in the AndroidManifest.xml file) - The debug output dump of the CheckJNI (warning and errors) is still printed in the DDMS, even if i use a Gingerbread values and install it on a Gingerbread emulator.
The only difference that i have found is that CheckJNI warnings on an Ice Cream Sandwich emulator (no matter what were the values in my AndroidManifest.xml file) will cause the app to crash with the respected warning - while they would only be printed in a Gingerbread emulator (I have tested a DeleteGlobalRef used on local reference to induce this warning). There are two non-informational logs that are printed in accordance to the AndroidManifest.xml - But the logs of the of the CheckJNI mode are not affected. Here are the logs - #On ICS emulator After Installing the app: 01-19 08:43:01.491: D/AndroidRuntime(32): CheckJNI is ON Loading the app: 01-19 08:32:26.617: D/dalvikvm(590): Not late-enabling CheckJNI (already on) (The last line is printed only when debuggable="true") 01-19 08:32:27.066: I/dalvikvm(590): Turning on JNI app bug workarounds for target SDK version 10... (The last line is printed only when targetSdkVersion=10) On error code (crash): 01-19 08:37:56.176: W/dalvikvm(651): JNI WARNING: DeleteGlobalRef on non-global 0x41339550 (type=1) ... 01-19 08:37:56.187: E/dalvikvm(651): VM aborting 01-19 08:37:56.187: A/libc(651): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1) #On Gingerbread: After Installing the app: 01-19 08:43:01.491: D/AndroidRuntime(32): CheckJNI is ON Loading the app: No important logs On error code (no crash): 01-19 08:45:20.079: W/dalvikvm(304): JNI: DeleteGlobalRef(0x40608718) failed to find entry (valid=1) So my question is how should i turn it on/off - and how should it affect the application (or the logs) differently when on? Thanks. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en