1

I am trying to create a Jabber (Jabber.net) chat client using Unity3D(Mono/C#) for iOS and Android. I got the client working in iOS (also runs well in Unity simulator). However, when running it on a Nexus 7 or HTC Desire it does not work. It does not crash, but does not connect either. It just produces the following error:

D/dalvikvm(9368): No JNI_OnLoad found in /system/lib/libc.so 0x413b7270, skipping init

This error is connected to the Connect method of my Jabber.net client:

jc = new JabberClient();
...
// Setting up the jabberclient and attaching eventhandlers
...
jc.Connect();

Any ideas how to solve it?

Edit: Reseaching JNI_OnLoad, I found this description:

"The VM calls JNI_OnLoad when the native library is loaded (for example, through System.loadLibrary). JNI_OnLoad must return the JNI version needed by the native library. In order to use any of the new JNI functions, a native library must export a JNI_OnLoad function that returns JNI_VERSION_1_2. If the native library does not export a JNI_OnLoad function, the VM assumes that the library only requires JNI version JNI_VERSION_1_1. If the VM does not recognize the version number returned by JNI_OnLoad, the native library cannot be loaded."

from http://docs.oracle.com/javase/6/docs/technotes/guides/jni/spec/invocation.html#wp9502

Could it be possible to rebuild Jabber.net with a JNI_OnLoad method returning JNI_VERSION_1_2 ??

Sunkas
  • 9,542
  • 6
  • 62
  • 102

1 Answers1

2

It's simply not possible. Don't try this at home kids.

Crypth
  • 1,576
  • 18
  • 32
  • My conclusion as well. Used ASmack instead and built a custom version for Android and then used Unity methods to call Java code in a jar-file. – Sunkas Sep 06 '12 at 11:49