Android jar lib dependent on other jars

Hello forum.
I made a jar plugin using Eclipse and compiling it as an Android library.
This jar needs 4 other 3rd party jars to work.
I need to use my jar in Unity by calling a function.
If I will keep in the function the reference to one of the other 4 jars, I’ll get a NoClassDefFoundException with the name of the 3rd party class called.

What did I try?
1 - compiling the jar including the 3rd parties jars → not able to do that in Eclipse
2 - adding the 3rd party jars in the same folder than my jar (Plugins/Android) → still exception
3 - adding the 3rd party jars in a subfolder of my jar that will replicate the subfolders structure of the Eclipse project → still exception
4 - adding the entire eclipse project in the Plugins/Android/ subfolder → no more able to compile

Can you please help me to figure out how to do this?
Thank you very much :slight_smile:

Hi guys.
I think that now I’m able to see the other libraries but now I’m getting this error:

AndroidJavaException: java.lang.ExceptionInInitializerError
  at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <filename unknown>:0
  at UnityEngine.AndroidJNISafe.CallStaticStringMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in <filename unknown>:0
  at UnityEngine.AndroidJavaObject._CallStatic[String] (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
  at UnityEngine.AndroidJavaObject.CallStatic[String] (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0

and I have no idea on how to fix this. The good news is that I’m not anymore having the ClassNotFoundException :stuck_out_tongue:

Any suggestion?

Thank you