Afternoon all, I am trying to implement a plugin using an existing JAR file from a customer and i'm just running into a wall every time i make a change. Basically the plugin is loading and the apk from unity is building but once i try and run anything from the provided SDK it can't find ANY Of the referenced classes within. thinking that they might just be referenced in the jar and not included i copied over the additional jar files but that broke basically saying there were duplicates. From there i've tried adding in the individual activities in the manifest and thats not making a difference either. Below is the function i setup in unity.. which is does work to an extent by firing off the INIT function within the SDK jar, but then fails when INIT is looking for its related functions in the jar. Any thoughts on what I could be doing wrong? Seems as though if the jar itself is working and it is getting load into the app properly then it should understand all of the references within the actual jar itself. Code (CSharp): if (JPRObject == null) { using (AndroidJavaClass activityClass = new AndroidJavaClass ("com.unity3d.player.UnityPlayer")) { Debug.Log ("********** Setting up JPRObject **********"); activityContext = activityClass.GetStatic<AndroidJavaObject>("currentActivity"); Debug.Log ("********** ActivityContet is now set to the currentActivity **********"); } } using (AndroidJavaClass pluginClass = new AndroidJavaClass ("com.jr.sdk.JR")) { if (pluginClass != null) { JPRObject = pluginClass.CallStatic<AndroidJavaObject> ("instance"); activityContext.Call ("runOnUiThread", new AndroidJavaRunnable (() => { Debug.Log ("********** Performin INIT **********"); JPRObject.Call ("UnityJPInit", APIKey, activityContext); Debug.Log ("********** INIT Finished **********"); })); } } and here's an example of the errors i get.. Code (CSharp): 01-10 08:10:55.896: I/dalvikvm(28301): Could not find method net.danlew.android.joda.JodaTimeAndroid.init, referenced from method com.jr.sdk.JR.Init 01-10 08:10:55.896: W/dalvikvm(28301): VFY: unable to resolve static method 6357: Lnet/danlew/android/joda/JodaTimeAndroid;.init (Landroid/content/Context;)V 01-10 08:10:55.896: D/dalvikvm(28301): VFY: replacing opcode 0x71 at 0x000c 01-10 08:10:55.896: W/dalvikvm(28301): Unable to resolve superclass of Lcom/jr/sdk/views/activities/LoginActivity; (155) 01-10 08:10:55.896: W/dalvikvm(28301): Link of class 'Lcom/jr/sdk/views/activities/LoginActivity;' failed 01-10 08:10:55.896: E/dalvikvm(28301): Could not find class 'com.jr.sdk.views.activities.LoginActivity', referenced from method com.jr.sdk.JR.showDashboard 01-10 08:10:55.896: W/dalvikvm(28301): VFY: unable to resolve const-class 641 (Lcom/jr/sdk/views/activities/LoginActivity;) in Lcom/jr/sdk/JR; Thanks so much in advance.
The SDK that you received as a .jar probably references other libraries with types that it needs for properly working. In case you only include the "SDK" .jar in your project it doesn't work.