title: android: ClassNotFoundException when trying to start phonegap activity
body: <p>I have a phonegap activity which I want to start via a button press:</p>
  
  <pre><code>shareButton.setOnClickListener(new OnClickListener() {
              public void onClick(View v) {
                  Intent activity = new Intent(context, GalleryActivity.class);
                  context.startActivity(activity);
              }
          });
  </code></pre>
  
  <p>The problem is: everytime I want to start the activity I get following error:</p>
  
  <blockquote>
    <p>java.lang.NoClassDefFoundError: net.myns.lib.cutoutcam.GalleryActivity</p>
  </blockquote>
  
  <p>The activity looks like that:</p>
  
  <pre><code>package net.myns.lib.cutoutcam;
  import org.apache.cordova.DroidGap;
  
  import android.os.Bundle;
  import android.util.Log;
  
  public class GalleryActivity extends DroidGap {
  
  
      private static final String TAG = "GalleryActivity";
  
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          super.loadUrl("file:///android_asset/www/index.html");
          Log.v(TAG, TAG+" initialised");
      }
  
  
  }
  </code></pre>
  
  <p>The manifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="net.myns.cutoutcamPro"
      android:versionCode="32"
      android:versionName="3.2" &gt;
  
      &lt;application
          android:icon="@drawable/icon"
          android:label="@string/app_name" 
          android:hardwareAccelerated="true"&gt;
          &lt;activity
              android:name=".CutoutCamProActivity"
              android:configChanges="keyboard|orientation|keyboardHidden"
              android:label="@string/app_name"
              android:windowSoftInputMode="adjustPan" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.media.action.IMAGE_CAPTURE" /&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="net.myns.lib.cutoutcam.PreferenceActivity"
              android:label="@string/set_preferences" &gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="net.myns.lib.cutoutcam.LoginActivity"
              android:label="Share image" &gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="net.myns.lib.cutoutcam.RegisterActivity"
              android:label="Share image" &gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="net.myns.lib.cutoutcam.GalleryActivity"
              android:label="All images" &gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
      &lt;supports-screens 
             android:largeScreens="true" 
             android:normalScreens="true" 
             android:smallScreens="true" 
             android:resizeable="true" 
             android:anyDensity="true" /&gt;
  
  
      &lt;uses-sdk
          android:minSdkVersion="7"
          android:targetSdkVersion="8" /&gt;
  
      &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  
      &lt;uses-feature android:name="android.hardware.camera.autofocus" android:required="false" /&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>The GalleryActivity is stored inside a LibraryProject, don't know whether this makes any difference.</p>
  
  <p>As soon as I replace "extends DroidGap" with "extends Activity" the activity can be started.</p>
  
  <p>Someone knows whats going wrong here?</p>