Hi guys,
I am stuck in trying to run the JavaPluginSample that Unity provides as an example for writing Android plugins. I have setup my system with the Android NDK and with Ant (although I prefer to do my Java development in Eclipse). So, although not necessary, I have compiled anew the jni.cpp into the libjni.so and the JavaClass.java into the JavaClass.class. The whole thing works if I build it as an .apk and run it on an Android device. The problem is I can’t seem to run it in the editor (with the development system set to Android). Every time any command coming from the libjni.so is called I get the dreaded DllNotFoundException: jni.
I have read pretty much everything there is out there on how to do this and I am not even sure if the Unity editor supports running Android plugins. It seems to have no problem with Windows plugins, so am I missing something?
I have made no changes to the code provided in the example. All the files are in the places given by the example. I tried to make it work before compiling the jni.cpp and the JavaClass.java and also after. Same difference.
I need to use this example as a base to develop my own code which brings external libraries also into the Android part of the development so it will get complicated. Thus I really need to be able to run the whole thing in the editor and not just in an actual machine for debugging purposes.
I realize the subject is a bit esoteric and I have seen a few unanswered questions regarding the jni in the forums, but because of this, any answer to the above would be useful not only to me but to quite a few other people.
Thanks in advance