Could not find class when application is loaded into emulator
<p>I have an activity (DemoAppActivity) from which I am trying to launch a different activity (MainActivity) when a button is pressed.  However I am getting two errors:</p>

<p>1) when the app is loaded into the emulator, I see the following in the Android logs:</p>

<pre><code>10-12 18:48:19.579: ERROR/dalvikvm(620): Could not find class 'com.example.android.hcgallery.MainActivity', referenced from method com.consultknapp.demoapp.DemoAppActivity$1.onClick
</code></pre>

<p>2) when i actually push the button that calls startActivity:</p>

<pre><code>10-12 18:54:58.019: ERROR/AndroidRuntime(620): java.lang.NoClassDefFoundError: com.example.android.hcgallery.MainActivity
</code></pre>

<p>Here is how I am starting the activity (note: I import the class with an import statment, import com.example.android.hcgallery.MainActivity) </p>

<pre><code>startActivity(new Intent(DemoAppActivity.this, MainActivity.class));
</code></pre>

<p>I have the MainActivity project folder in my build path in eclipse, and I even see it load the MainActivity.apk when I compile/run my DemoAppActivity.  However, it bombs when I try to run it on the emulator. </p>

<p>What am I missing here?  Do I need to jar up my MainActivity and include it in the DemoAppActivity somehow?</p>
