On Apr 22, 11:52 am, socratesJ <
mcart...@gmail.com> wrote:
> This is indeed a static method. Adding the 'jclass clazz' parameter
> fixed the issue. I really don't understand why that parameter is
> required for a static method, especially since I don't use it
> directly. JNI is a bit strange ...
You declared it:
nativeOrientationChange(JNIEnv*, jfloatArray)
for a static method it should be be:
nativeOrientationChange(JNIEnv*, jclass, jfloatArray)
for a virtual method it should be:
nativeOrientationChange(JNIEnv*, jobject, jfloatArray)
Note 3 args instead of 2. You were making float array calls on the
class object. With CheckJNI enabled these situations are detected,
without it the VM skips the extra overhead of type checking and just
does what you ask.