ClassNotFoundException despite class seemingly still there
<p>I have an app in which I have </p>

<pre><code>public class mainactivity extends Activity implements View.OnClickListener
{
...
</code></pre>

<p>and I declare it in that manifest. Everything compiles and runs perfectly. Then I change the class as follows: </p>

<pre><code>public class mainactivity extends Activity implements View.OnClickListener , MoPubInterstitialListener
{
...
+ extra code to do with "mopub"
</code></pre>

<p>this new code compiles, but now, as soon as my splash screen activity shuts down and hands over to mainactivity, I see </p>

<pre><code>03-08 10:47:40.380: I/dalvikvm(9013): Failed resolving Lcom/mycompany/myapp/mainactivity; interface 1127 'Lcom/mopub/mobileads/MoPubInterstitial$MoPubInterstitialListener;'
03-08 10:47:40.380: W/dalvikvm(9013): Link of class 'Lcom/mycompany/myapp/mainactivity;' failed
03-08 10:47:40.380: D/AndroidRuntime(9013): Shutting down VM
03-08 10:47:40.380: W/dalvikvm(9013): threadid=1: thread exiting with uncaught exception (group=0x40c7e1f8)
03-08 10:47:40.385: E/AndroidRuntime(9013): FATAL EXCEPTION: main
03-08 10:47:40.385: E/AndroidRuntime(9013): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mycompany.myapp/com.mycompany.myapp.mainactivity}: java.lang.ClassNotFoundException: com.mycompany.myapp.mainactivity
03-08 10:47:40.385: E/AndroidRuntime(9013):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1891)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at android.app.ActivityThread.access$600(ActivityThread.java:127)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at android.os.Looper.loop(Looper.java:137)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at android.app.ActivityThread.main(ActivityThread.java:4511)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at java.lang.reflect.Method.invokeNative(Native Method)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at java.lang.reflect.Method.invoke(Method.java:511)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at dalvik.system.NativeStart.main(Native Method)
03-08 10:47:40.385: E/AndroidRuntime(9013): Caused by: java.lang.ClassNotFoundException: com.mycompany.myapp.mainactivity
03-08 10:47:40.385: E/AndroidRuntime(9013):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at android.app.Instrumentation.newActivity(Instrumentation.java:1026)
03-08 10:47:40.385: E/AndroidRuntime(9013):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1882)
03-08 10:47:40.385: E/AndroidRuntime(9013):     ... 11 more
</code></pre>

<p>I'm at a loss as to how to proceed. If I try the debugger it appears that not even the first line of mainactivity.OnCreate() is executed.</p>

<p>EDIT: I have the following included in my manifest:</p>

<pre><code>&lt;activity android:name="com.mopub.mobileads.MoPubActivity"
 android:configChanges="keyboardHidden|orientation"/&gt;
</code></pre>
