title: Android ClassNotFoundException: Didn't find class on path
body: <pre><code>10-22 15:29:40.897: E/AndroidRuntime(2561): FATAL EXCEPTION: main
  10-22 15:29:40.897: E/AndroidRuntime(2561): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.gvg.simid/com.gvg.simid.Login}: java.lang.ClassNotFoundException: Didn't find class "com.gvg.simid.Login" on path: DexPathList[[zip file "/data/app/com.gvg.simid-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.gvg.simid-1, /vendor/lib, /system/lib]]
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2137)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at android.os.Handler.dispatchMessage(Handler.java:99)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at android.os.Looper.loop(Looper.java:137)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at android.app.ActivityThread.main(ActivityThread.java:5103)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at java.lang.reflect.Method.invokeNative(Native Method)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at java.lang.reflect.Method.invoke(Method.java:525)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at dalvik.system.NativeStart.main(Native Method)
  10-22 15:29:40.897: E/AndroidRuntime(2561): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.gvg.simid.Login" on path: DexPathList[[zip file "/data/app/com.gvg.simid-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.gvg.simid-1, /vendor/lib, /system/lib]]
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
  10-22 15:29:40.897: E/AndroidRuntime(2561):     ... 11 more
  </code></pre>
  
  <p>I'm not really sure what is causing it as it is correctly listed in 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="com.gvg.simid"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="18" /&gt;
  
      &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.BLUETOOTH" /&gt;
      &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /&gt;
      &lt;uses-permission android:name="android.permission.CAMERA"/&gt;
      &lt;uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.READ_LOGS" /&gt;
      &lt;uses-permission android:name="android.permission.READ_OWNER_DATA" /&gt;
      &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.RECORD_AUDIO"/&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_OWNER_DATA" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_SETTINGS" /&gt;
      &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
  
      &lt;uses-feature android:name="android.hardware.usb.host" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.gvg.simid.Login"
              android:label="@string/app_name" 
              android:screenOrientation="landscape"&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;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>I also added "Android Private Libraries" to build path, and moved it to the top of "Order and Export", but it still gave me the same error.</p>
  
  <p>EDIT: I rebuilt the project completely, and was unable to reproduce the error.  Not sure what was causing it.</p>