title: Android runtime exception - Could not find class XXX referenced from method XXX.<init>
body: <p>I have a few android projects that i'm trying to put together, but i'm facing some runtime exceptions that i can't understand.</p>
  
  <p>The projects are built like this:</p>
  
  <hr>
  
  <p>C/C++ Project 
  ProjCore (has .c and .h files) </p>
  
  <hr>
  
  <p>Android Project 
  ProjB -> uses -> ProjCore </p>
  
  <p>Notes:
  ProjB implements a <strong>Service</strong> and uses ProjCore through aidl generated java classes.
  ProjCore is inside <strong>jni</strong> folder.
  NDK is installed.
  ProjB is configured to run ndk-build automatically.
  ProjCore's compilation generate a <strong>libs</strong> dir with a .so file.</p>
  
  <hr>
  
  <p>Android project 
  ProjA -> uses -> ProjB </p>
  
  <p>Notes:
  ProjA implements an Activity and uses ProjB Service class.</p>
  
  <hr>
  
  <p>ProjA and ProjB(including ProjCore) build successfully, the apk are generated, but in runtime, when i run ProjA's activity i get the following error messages:</p>
  
  <pre><code>W/dalvikvm(5357): Unable to resolve superclass of Lcom/signove/health/servicetest/HealthServiceTestActivity$1; (16)
  
  W/dalvikvm(5357): Link of class 'Lcom/signove/health/servicetest/HealthServiceTestActivity$1;' failed
  
  E/dalvikvm(5357): Could not find class 'com.signove.health.servicetest.HealthServiceTestActivity$1', referenced from method com.signove.health.servicetest.HealthServiceTestActivity.&lt;init&gt;
  </code></pre>
  
  <hr>
  
  <p>From what I've learned, these messages are often associated with projects using external jars, and people forget to put these jars in libs folder. But the project crashing(ProjA) only has dependency with project ProjB and the dependency is configured in project properties.</p>
  
  <p>I'm using:
   - Kubuntu 10.04
   - Eclipse Indigo
   - Android NDK-r8
   - Eclipse CDT installed</p>
  
  <p>Does anyone know what the problem is?</p>