title: Android 4: Failed resolving class from org.simalliance.openmobileapi package
body: <p>I'm working on application which make use of the org.simalliance.openmobileapi API to use the Secure element communication.</p>
  
  <p>The application is Native that is the main Activity call a JNI library to operate. The JNI library use the JNI Method to call functions of the org.simalliance.openmobileapi package.</p>
  
  <p>The API level is 8 as write in the mainfest:</p>
  
  <pre><code>&lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/&gt;
  </code></pre>
  
  <p>The application work fine with Android 2.3.6 but when i try to launch the application from Android 4.0.4 or later the application can't find the SEService class of the org.simalliance.openmobileapi. Useful log are:</p>
  
  <pre><code>09-20 11:00:48.509: I/dalvikvm(1104): Failed resolving Lpkg/wrapper/SecureChannel; interface 203 'Lorg/simalliance/openmobileapi/SEService$CallBack;'
  09-20 11:00:48.509: W/dalvikvm(1104): Link of class 'Lpkg/wrapper/SecureChannel;' failed
  01-01 22:08:33.460: I/dalvikvm(10881): java.lang.NoClassDefFoundError: org.simalliance.openmobileapi.SEService$1
  </code></pre>
  
  <p>The class SecureChannel is a Java class that is called by the JNI to operate over the Secure Element and is contained in a jar that is "dexed" at compiling time with the rest of the project.</p>
  
  <p>The package org.simalliance.openmobileapi.jar is contained in the /system/framework folder in both version of Android:</p>
  
  <p>On Android 2.3.6</p>
  
  <pre><code>-rw-r--r-- root     root        29148 2012-11-15 11:24 org.simalliance.openmobileapi.jar
  </code></pre>
  
  <p>On Android 4.0.4</p>
  
  <pre><code>-rw-r--r-- root     root          313 2012-06-11 15:49 org.simalliance.openmobileapi.jar
  -rw-r--r-- root     root        24864 2012-06-11 15:49 org.simalliance.openmobileapi.odex
  </code></pre>
  
  <p>The only difference i see is the odex file in the Android 4.0.4 OS. 
  Is there a way to include the classpath or the reference to a package contained in the /system/framework folder ?</p>