title: GoogleMapsDemo gives IllegalStateException
body: <p>I have did all steps which is give at google but lastly it give's this </p>
  
  <pre><code>errorCaused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4132500 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;
  </code></pre>
  
  <h3>AndroidManifest.xml:</h3>
  
  <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.googlemapsdemo"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;permission
          android:name="com.example.googlemapsdemo.permission.MAPS_RECEIVE"
          android:protectionLevel="signature" /&gt;
      &lt;uses-permission android:name="com.example.googlemapsdemo.permission.MAPS_RECEIVE" /&gt;
  
      &lt;uses-sdk
          android:minSdkVersion="12"
          android:targetSdkVersion="17" /&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;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  
      &lt;!-- Required to show current 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;!-- Required OpenGL ES 2.0. for Maps V2 --&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="com.example.googlemapsdemo.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="AIzaSyBLHwjdXsQK0sszxfrkoncHlqU3d2mDJok" /&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <h3>MainActivity.java:</h3>
  
  <pre><code>package com.example.googlemapsdemo;
  
  import com.google.android.gms.maps.GoogleMap;
  import com.google.android.gms.maps.MapFragment;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.view.Menu;
  import android.widget.Toast;
  
  public class MainActivity extends Activity 
  {
      private GoogleMap googleMap;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) 
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          try 
          {
              // Loading map
              initilizeMap();
  
          } catch (Exception e) 
          {
              e.printStackTrace();
          }
  
      }
  
      /**
       * function to load map. If map is not created it will create it for you
       * */
      private void initilizeMap() 
      {
          if (googleMap == null) 
          {
              googleMap = ((MapFragment) getFragmentManager().findFragmentById(
                      R.id.map)).getMap();
  
              // check if map is created successfully or not
              if (googleMap == null)
              {
                  Toast.makeText(getApplicationContext(),
                          "Sorry! unable to create maps", Toast.LENGTH_SHORT)
                          .show();
              }
          }
      }
  
      @Override
      protected void onResume() 
      {
          super.onResume();
          initilizeMap();
      }
  }
  </code></pre>