title: Google Map not working: Classnotfound Exception
body: <p>I have created the Google Map Marker Sample project using Google SDK , Eclipse. when it comes to the execution, the bin file seems cannot help me install correctly onto the device and make it work. In detail , the Logcat shows the following message: </p>
  
  <p>Class Not found exception error log</p>
  
  <pre><code>05-16 11:25:50.742: E/AndroidRuntime(25267): Process: com.example.testgpsmarker, PID: 25267
  05-16 11:25:50.742: E/AndroidRuntime(25267): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.testgpsmarker/com.example.testgpsmarker.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.testgpsmarker.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.testgpsmarker-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.testgpsmarker-2, /vendor/lib, /system/lib]]
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at android.app.ActivityThread.access$800(ActivityThread.java:135)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at android.os.Handler.dispatchMessage(Handler.java:102)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at android.os.Looper.loop(Looper.java:136)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at android.app.ActivityThread.main(ActivityThread.java:5017)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at java.lang.reflect.Method.invokeNative(Native Method)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at java.lang.reflect.Method.invoke(Method.java:515)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at dalvik.system.NativeStart.main(Native Method)
  05-16 11:25:50.742: E/AndroidRuntime(25267): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.testgpsmarker.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.testgpsmarker-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.testgpsmarker-2, /vendor/lib, /system/lib]]
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
  05-16 11:25:50.742: E/AndroidRuntime(25267):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
  </code></pre>
  
  <p>Below is my code:</p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          mapView = (MapView) findViewById(R.id.mapview);
          mc = mapView.getController();
          int latitude = 22285520 ;
          int longitude = 114157690;
  
          showLocation(latitude,longitude);
      }
  
      private Handler h = new Handler(){
  
          // Invoked by the method onTap()
          // in the class CurrentLocationOverlay
          @Override
              public void handleMessage(Message msg) {
              Bundle data = msg.getData();
  
              // Getting the Latitude of the location
              int latitude = data.getInt("latitude");
  
              // Getting the Longitude of the location
              int longitude = data.getInt("longitude");
  
              // Show the location in the Google Map
              showLocation(latitude,longitude);
          }
      };
  
      protected void showLocation(int latitude, int longitude) {
          // TODO Auto-generated method stub
            mapView.setBuiltInZoomControls(true);
  
              // Getting the MapController
              MapController mapController = mapView.getController();
  
              // Getting Overlays of the map
              List&lt;Overlay&gt; overlays = mapView.getOverlays();
  
              // Getting Drawable object corresponding to a resource image
              Drawable drawable = getResources().getDrawable(R.drawable.marker);
  
              // Creating an ItemizedOverlay
              TouchedLocationOverlay locationOverlay = new TouchedLocationOverlay(drawable,h);
  
              // Getting the MapController
              MapController mc = mapView.getController();
  
              // Creating an instance of GeoPoint, to display in Google Map
              GeoPoint p = new GeoPoint(
                                    latitude,
                                    longitude
                               );
  
              // Locating the point in the Google Map
              mc.animateTo(p);
  
              // Creating an OverlayItem to mark the point
              OverlayItem overlayItem = new OverlayItem(p, "Item", "Item");
  
              // Adding the OverlayItem in the LocationOverlay
              locationOverlay.addOverlay(overlayItem);
  
              // Clearing the overlays
              overlays.clear();
  
              // Adding locationOverlay to the overlay
              overlays.add(locationOverlay);
  
              // Redraws the map
              mapView.invalidate();
  
      }
  </code></pre>
  
  <p>\</p>
  
  <p>Layout</p>
  
  <pre><code>&lt;com.google.android.maps.MapView
      android:id="@+id/mapview"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:clickable="true"
      android:enabled="true"
      android:apiKey="sdsdfsdfscdsfsdf" /&gt;
  </code></pre>
  
  <p>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.example.testgpsmarker"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="18"
          android:targetSdkVersion="19" /&gt;
  
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&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:theme="@style/AppTheme" &gt;
  
          &lt;activity
              android:name="com.example.testgpsmarker.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;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Which configuration should I correct ? </p>