title: Unfortunately Application has stopped on Android
body: <p>Im new to android development so im following basic tutorials online. I followed a google map v2 android tutorial.The Android app crashes with the error, <strong>"Unfortunately, my app has stopped working"</strong>.I am using the most recent Android and Google Maps APIs (Android 4.2.2 and Google APIs 17).And I have done import the library project into project workspace[<strong>File > Import, select Android > Existing Android Code into Workspace</strong>].</p>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>package com.vogella.android.locationapi.maps;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.Menu;
  
  import com.google.android.gms.maps.CameraUpdateFactory;
  import com.google.android.gms.maps.GoogleMap;
  import com.google.android.gms.maps.MapFragment;
  import com.google.android.gms.maps.model.BitmapDescriptorFactory;
  import com.google.android.gms.maps.model.LatLng;
  import com.google.android.gms.maps.model.Marker;
  import com.google.android.gms.maps.model.MarkerOptions;
  
  public class MainActivity extends Activity {
    static final LatLng HAMBURG = new LatLng(53.558, 9.927);
    static final LatLng KIEL = new LatLng(53.551, 9.993);
    private GoogleMap map;
  
    @Override
    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))
          .getMap();
      Marker hamburg = map.addMarker(new MarkerOptions().position(HAMBURG)
          .title("Hamburg"));
      Marker kiel = map.addMarker(new MarkerOptions()
          .position(KIEL)
          .title("Kiel")
          .snippet("Kiel is cool")
          .icon(BitmapDescriptorFactory
              .fromResource(R.drawable.ic_launcher)));
  
      // Move the camera instantly to hamburg with a zoom of 15.
      map.moveCamera(CameraUpdateFactory.newLatLngZoom(HAMBURG, 15));
  
      // Zoom in, animating the camera.
      map.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);
    }
  
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
    }
  
  } 
  </code></pre>
  
  <p><strong>Main.xml</strong></p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".MainActivity" &gt;
  
      &lt;fragment
          android:id="@+id/map"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          class="com.google.android.gms.maps.MapFragment" /&gt;
  
  &lt;/RelativeLayout&gt; 
  </code></pre>
  
  <p><strong>AndroidManifest</strong></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.vogella.android.locationapi.maps"
      android:versionCode="1"
      android:versionName="1.0" &gt;
      &lt;uses-sdk
          android:minSdkVersion="17"
          android:targetSdkVersion="17" /&gt;
  &lt;permission
          android:name="com.vogella.android.locationapi.maps.permission.MAPS_RECEIVE"
          android:protectionLevel="signature" /&gt;
      &lt;uses-feature
          android:glEsVersion="0x00020000"
          android:required="true" /&gt;
      &lt;uses-permission android:name="com.vogella.android.locationapi.maps.permission.MAPS_RECEIVE" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&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.vogella.android.locationapi.maps.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;meta-data
              android:name="com.google.android.maps.v2.API_KEY"
              android:value="My Map API Key"/&gt;       
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>No Errors displayed in LogCat.So how can I find out why the app crashes?Does anybody have any idea about it?</p>