title: Google Map App Crashes on Runtime
body: <p>I'm trying create a simple project on Google maps. I have referred many tutorials to do so, but unfortunately my app crashes giving me the following errors.</p>
  
  <p>ERRORS:</p>
  
  <pre><code>03-04 17:15:45.766: E/AndroidRuntime(2439): FATAL EXCEPTION: main 
  03-04 17:15:45.766: E/AndroidRuntime(2439): Process: com.example.myapp, PID: 2439
  03-04 17:15:45.766: E/AndroidRuntime(2439): java.lang.RuntimeException: Unable to start activity  ComponentInfo{com.example.myapp/com.example.myapp.MainActivity}: android.view.InflateException: Binary XML file line #18: Error inflating class fragment
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2693)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2760)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.app.ActivityThread.access$900(ActivityThread.java:177)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.os.Handler.dispatchMessage(Handler.java:102)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.os.Looper.loop(Looper.java:145)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.app.ActivityThread.main(ActivityThread.java:5944)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at java.lang.reflect.Method.invoke(Native Method)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at java.lang.reflect.Method.invoke(Method.java:372)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
  03-04 17:15:45.766: E/AndroidRuntime(2439): Caused by: android.view.InflateException: Binary XML file line #18: Error inflating class fragment
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:770)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.view.LayoutInflater.inflate(LayoutInflater.java:483)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at     com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:435)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.app.Activity.setContentView(Activity.java:2267)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.example.myapp.MainActivity.onCreate(MainActivity.java:16)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.app.Activity.performCreate(Activity.java:6289)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
  03-04 17:15:45.766: E/AndroidRuntime(2439): ... 10 more
  03-04 17:15:45.766: E/AndroidRuntime(2439): Caused by:     java.lang.IllegalStateException: The meta-data tag in your app's     AndroidManifest.xml does not have the right value.  Expected 6587000 but found 0.  You must have the following declaration within the &lt;application&gt; element:     &lt;meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /&gt;
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.google.android.gms.common.GooglePlayServicesUtil.D(Unknown Source)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.google.android.gms.maps.internal.x.T(Unknown Source)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.google.android.gms.maps.internal.x.S(Unknown Source)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.google.android.gms.maps.SupportMapFragment$b.nO(Unknown Source)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.google.android.gms.maps.SupportMapFragment$b.a(Unknown Source)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.google.android.gms.dynamic.a.a(Unknown Source)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2158)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:297)
  03-04 17:15:45.766: E/AndroidRuntime(2439): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:734)
  03-04 17:15:45.766: E/AndroidRuntime(2439): ... 19 more
  </code></pre>
  
  <p>Manfest.xml</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.myapp"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="21" /&gt;
  &lt;permission android:name="com.example.myapp.permission.MAPS_RECEIVE" android:protectionLevel="signature"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;
  &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&gt;
  &lt;!-- External storage for caching. --&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;
  &lt;!-- My Location --&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt;
  &lt;uses-feature android:glEsVersion="0x00020000" android:required="true"/&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=".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 key"/&gt;
       &lt;meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p>MainActivity.java</p>
  
  <pre><code>package com.example.myapp;
  
  import android.support.v4.app.FragmentActivity; 
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  
  public class MainActivity extends FragmentActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
      if (id == R.id.action_settings) {
          return true;
      }
      return super.onOptionsItemSelected(item);
  }
  }
  </code></pre>
  
  <p>activity_mail.xml</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
   android:id="@+id/map"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   class="com.google.android.gms.maps.SupportMapFragment"/&gt;
  </code></pre>