Jabber.net on Unity/Android error (No JNI_OnLoad found in /system/lib/libc.so, skipping init)

匿名 (未验证) 提交于 2019-12-03 08:28:06

问题:

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 ??

回答1:

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



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!