title: java.lang.ClassNotFoundException for MainActivity while running the location update sample code
body: <p>I am following the training tutorial on <a href="http://developer.android.com/training/location/retrieve-current.html" rel="nofollow">this link</a>: . It gives some exceptions at run time, following is the few initial lines of log trace:</p>
  
  <pre><code>07-07 10:54:51.408: E/AndroidRuntime(31450): FATAL EXCEPTION: main
  07-07 10:54:51.408: E/AndroidRuntime(31450): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.android.location/com.example.android.location.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.android.location.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.android.location-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.android.location-1, /vendor/lib, /system/lib]]
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2269)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at android.app.ActivityThread.access$600(ActivityThread.java:162)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at android.os.Handler.dispatchMessage(Handler.java:107)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at android.os.Looper.loop(Looper.java:194)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at android.app.ActivityThread.main(ActivityThread.java:5371)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at java.lang.reflect.Method.invokeNative(Native Method)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at java.lang.reflect.Method.invoke(Method.java:525)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at dalvik.system.NativeStart.main(Native Method)
  07-07 10:54:51.408: E/AndroidRuntime(31450): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.android.location.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.android.location-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.android.location-1, /vendor/lib, /system/lib]]
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2260)
  07-07 10:54:51.408: E/AndroidRuntime(31450):    ... 11 more
  </code></pre>
  
  <p>Below is my manifest file code</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.android.location"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="11"
      android:targetSdkVersion="19" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:description="@string/app_description"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.example.android.location.MainActivity"
          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;
      &lt;service
          android:name="com.example.android.location.ReceiveUpdatesIntentService"
          android:label="@string/app_name"
          android:exported="false"&gt;&lt;/service&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p>i also added the internet permission but it is not working</p>