Hi,
I have a C library that utilizes JNI_OnLoad to cache the VM pointer. However, when using the library in Xamarin.Android, the JNI_OnLoad method is not invoked.So I was trying to use the JNI_GetCreatedJavaVMs to get the JavaVM pointer, but it seems that this function was not exported in earlier NDKs. When I look at the latest version of the NDK, the
sysroot/usr/include/jni.h file has this function exported.
When I try to use it, I still get undefined reference on JNI_GetCreatedJavaVMs.
Does the latest version of the NDK actually export this method? Is there a specific library that I need to link with?