title: android.view.InflateException: Binary XML file line #12: Error inflating class fragment
body: <p>I want to display Google map in android application. I have done following steps.</p>
  
  <ol>
  <li>Created a new android application project with the package name com.gaurav.googlemap</li>
  <li>Downloaded Google Play Services SDK from SDK Manager</li>
  <li>Imported 'google-play-services_lib' into current workspace</li>
  <li><p>Linked 'google-play-services_lib' to my current project  </p>
  
  <p>(Project properties -> Android -> Add(Into Library Section) -> Selected 'google-play-services_lib'-> Apply -> Ok</p></li>
  <li><p>Registered SHA-1 fingerprint with following command </p>
  
  <p>keytool -list -v -keystore "%USERPROFILE%.android\debug.keystore" -alias    androiddebugkey -storepass android -keypass android  </p></li>
  <li><p>Generated Android API key from Google API console</p></li>
  <li><p>Modified AndroidManifest.xml as below  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;uses-sdk
      android:minSdkVersion="16"
      android:targetSdkVersion="17" /&gt;
  
  &lt;permission 
      android:name="com.gaurav.googlemap.permission.MAPS_RECEIVE"
      android:protectionLevel="signature"&gt;&lt;/permission&gt;
  &lt;uses-permission 
      android:name="com.gaurav.googlemap.permission.MAPS_RECEIVE"/&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;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;meta-data
          android:name="com.google.android.maps.v2.API_KEY"
          android:value="AIzaSyC3hd_PcjjfraFGfnx3UVi0FLO5AwgxFT8" /&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;/application&gt;
  </code></pre>
  
  <p></p></li>
  <li><p>Modified activity_main.xml as below  </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"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context="com.gaurav.googlemap.MainActivity" &gt;
  
  
  &lt;fragment 
      android:id="@+id/map"
      class="com.google.android.gms.maps.MapFragment"
      android:layout_height="match_parent"
      android:layout_width="match_parent"/&gt;
  </code></pre>
  
  <p></p></li>
  <li><p>Modified MainActivity.java as below   </p>
  
  <p>package com.gaurav.googlemap;  </p>
  
  <p>import android.app.Activity;<br>
  import android.os.Bundle;<br>
  import android.view.Menu;<br>
  import android.view.MenuItem;<br>
  import android.support.v4.app.Fragment;<br>
  import android.support.v4.app.FragmentActivity;  </p>
  
  <p>public class MainActivity extends FragmentActivity {</p>
  
  <pre><code>@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>}</p></li>
  <li><p>And finally I ran project into Android emulator</p></li>
  </ol>
  
  <p>But there is a exception in LogCat as below  </p>
  
  <pre><code>02-14 16:41:46.947: E/AndroidRuntime(1260): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gaurav.googlemap/com.gaurav.googlemap.MainActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class fragment
  </code></pre>
  
  <p>I have read many answers on similar questions, but I didn't get this problem fix.
  I am having operating system Windows 8.1 (32-bit) </p>
  
  <p>I have heard there is a different way to setup emulator to display Google map. Is this related to my problem?</p>
  
  <p>Please help me to fix this problem. Thanks.</p>