Problems DeSerializing Objects
<p>I have a Java application (JSE) that communicates with an Android apk. What it does is to trasnmit a simple object that will run on the app. The rick is that the target app doesn't have the .class for this object.
   In order for this to work out, what I do is:</p>

<p><strong>On the JSE</strong></p>

<pre><code>1 - I get the .class and put it on a Jar
2 - I convert such jar to an apk using the "dx" tool
3 - I transmit the apk along with the serializable object
</code></pre>

<p><strong>On the APP</strong></p>

<pre><code>1 - Receive both files
2 - Create a DexClassLoader for the jar
3 - Use it to deserialize the class
</code></pre>

<p>The thing is, the class extends another one that both the APP and the JSE have. But I'm getting the following error:</p>

<pre><code>03-23 13:37:22.681: D/dalvikvm(2352): DexOpt: --- BEGIN 'uExeTmp.jar-321768084659794738841' (bootstrap=0) ---
03-23 13:37:22.691: D/dalvikvm(2352): GC_CONCURRENT freed 449K, 52% free 2842K/5895K, external 76K/587K, paused 2ms+2ms
03-23 13:37:23.872: D/dalvikvm(2352): DexOpt: --- END 'uExeTmp.jar-321768084659794738841' (success) ---
03-23 13:37:23.872: D/dalvikvm(2352): DEX prep '/sdcard/uExeTmp.jar-321768084659794738841': unzip in 1ms, rewrite 1184ms
03-23 13:37:23.872: W/dalvikvm(2352): Class resolved by unexpected DEX: Lorg/unbiquitous/driver/spike/HelloAgent;(0x407d00f0):0x18ca68 ref [Lorg/unbiquitous/driver/execution/Agent;] Lorg/unbiquitous/driver/execution/Agent;(0x407508e8):0x1313f8
03-23 13:37:23.872: W/dalvikvm(2352): (Lorg/unbiquitous/driver/spike/HelloAgent; had used a different Lorg/unbiquitous/driver/execution/Agent; during pre-verification)
03-23 13:37:23.872: W/dalvikvm(2352): Unable to resolve superclass of Lorg/unbiquitous/driver/spike/HelloAgent; (67)
03-23 13:37:23.872: W/dalvikvm(2352): Link of class 'Lorg/unbiquitous/driver/spike/HelloAgent;' failed
03-23 13:37:23.872: W/dalvikvm(2352): threadid=13: thread exiting with uncaught exception (group=0x40252560)
03-23 13:37:23.872: E/AndroidRuntime(2352): FATAL EXCEPTION: Thread-14
03-23 13:37:23.872: E/AndroidRuntime(2352): java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
</code></pre>

<p><strong>OBS</strong>: I'm making sure that both the JSE and the APP are using the same version of the extended class. So this error doesn't makes much sense to me.</p>
