• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Android Jar file inside a Jar file and Using Unity3D

Hi,

I'm trying to create a plugin from an existing Jar file called IndoorAtlas. When I write my custom code (UnityBridge.java) I have to export the whole package to a jar file to get it to work in Unity3D. So the follwing happends:
IndoorAtlas.jar is contained in the newly exported jar file from eclipse.

When calling functions to test out if the connection between my UnityBridge.java and Unity3D it all works fine. But when I try to call functions in the IndoorAtlas.jar file, I get the following error:
07-21 17:22:55.808: I/Unity(21411): AndroidJavaException: java.lang.NoSuchMethodError: no method with name='GetInt' signature='()I' in class Lcom/indooratlas/example/UnityBridge;
07-21 17:22:55.808: I/Unity(21411): at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <filename unknown>:0
07-21 17:22:55.808: I/Unity(21411): at UnityEngine.AndroidJNISafe.GetMethodID (IntPtr obj, System.String name, System.String sig) [0x00000] in <filename unknown>:0
07-21 17:22:55.808: I/Unity(21411): at UnityEngine._AndroidJNIHelper.GetMethodID (IntPtr jclass, System.String methodName, System.String signature, Boolean isStatic) [0x00000] in <filename unknown>:0
07-21 17:22:55.808: I/Unity(21411): at UnityEngine.AndroidJNIHelper.GetMethodID (IntPtr javaClass, System.String methodName, System.String signature, Boolean isStatic) [0x00000] in <filename unknown>:0
07-21 17:22:55.808: I/Unity(21411): at UnityEngine._AndroidJNIHelper.GetMethodID[Int32] (IntPtr jclass, System.String methodName, System.Object[] args, Boolean isStatic) [0x00000] in <filename unknown>:0
07-21 17:22:55.808: I/Unity(21411): at UnityEngine.AndroidJNIHelper.GetMethodID[Int32] (IntPtr jclass, System.String methodName, System.Object[] args, Boolean isStatic) [0x00000] in <filename
Click to expand...
EDIT:
To make it clearer the code has to do the following:
Unity3D C# -> UnityBridge.Java -> IndoorAtlas.jar
IndoorAtlas.jar ->UnityBridge.Java -> Unity3D C#

Is there a way to get this working? or is there a way to merge 2 JAR files?

Thanks :D
 
Back
Top Bottom