title: How to fix this classnotfound exception in Android?
body: <p>I got the stack trace below in the Android developer account. There is just one occurrence of this error.</p>
  
  <pre><code>java.lang.RuntimeException: Unable to instantiate application com.mysite.myapp.TestApplication: java.lang.ClassNotFoundException: com.mysite.myapp.TestApplication in loader dalvik.system.PathClassLoader[/data/app-private/com.mysite.myapp-2.apk]
  at android.app.LoadedApk.makeApplication(LoadedApk.java:466)
  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3268)
  at android.app.ActivityThread.access$2200(ActivityThread.java:117)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:973)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:130)
  at android.app.ActivityThread.main(ActivityThread.java:3691)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:507)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
  at dalvik.system.NativeStart.main(Native Method)
  Caused by: java.lang.ClassNotFoundException: com.myapp.myapp.TestApplication in loader dalvik.system.PathClassLoader[/data/app-private/com.mysite.myapp-2.apk]
  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
  at android.app.Instrumentation.newApplication(Instrumentation.java:945)
  at android.app.LoadedApk.makeApplication(LoadedApk.java:461)
  ... 11 more
  </code></pre>
  
  <p>In my manifest file, I have declared <code>com.mysite.myapp.TestApplication</code>.
  My Manifest file looks like this:</p>
  
  <pre><code>&lt;application
      android:name="com.mysite.myapp.TestApplication"
      android:icon="@drawable/app_icon"
      android:label="@string/app_name"
      android:theme="@style/Theme.myapp" &gt;
      &lt;activity
          android:name="com.mysite.myapp.ActivityDashboard"
          android:configChanges="orientation|keyboard"
          android:label="@string/app_name" &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;/activity&gt;
  ...
  </code></pre>