title: Google Maps V2 - Error inflating class Fragment
body: <p>I'm trying my hand and Android Application Development. I'm currently using Eclipse (I can't remember the version, whatever the newest is). I've crossed a bridge where I just can't seem to grasp what I'm doing wrong. I'm attempting to use the Google Maps V2 API. I've been through several documents and tried several techniques, all of which lead to the same error:</p>
  
  <pre><code>Android.view.Inflate Exception: Binary XML file line #2: Error inflating class fragment
  </code></pre>
  
  <p>I've been pounding my face into the keys for 2 days straight trying to grasp what I'm doing wrong here.</p>
  
  <p>Things I've done:</p>
  
  <ol>
  <li>Started with a blank activity. </li>
  <li>Project -> Properties -> Android -> <em>Project Build Target is Google APIs - 4.2 - API 17</em> - I've tried <em>every</em> other option as well (as long as above version 3.0, found it documented</li>
  <li>Added the google-play-services_lib to my Package Explorer. I indicated that the google-play-services_lib was indeed <code>a library</code>.</li>
  <li>Project -> Properties -> Android -> Library -> Add -> and I choose the location to the google-play-services_lib.</li>
  <li>Included <code>android-support-v4.jar</code> as a dependency of my project.</li>
  </ol>
  
  <p>I've tried so many different answers from questions similar to mine, but to no avail. :(
  I can usually figure these things out, but maybe I'm just too overloaded.</p>
  
  <p>My package explorer tree in eclipse looks like</p>
  
  <ol>
  <li>google-play-services_lib</li>
  <li>Svma</li>
  </ol>
  
  <p>Here's the code:></p>
  
  <p><strong>activity_main.xml</strong></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>
  
  <p><strong>Manifest</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.testing.svma"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="17"
          android:targetSdkVersion="17" /&gt;
  
      &lt;permission
          android:name="com.testing.svma.permission.MAPS_RECEIVE"
          android:protectionLevel="signature" /&gt;
  
      &lt;uses-permission android:name="com.testing.svma.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="android.permission.ACCESS_COARSE_LOCATION" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
      &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&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.testing.svma.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="SHA1_Generated_KEY_HERE" /&gt;
      &lt;/application&gt;
  
      &lt;uses-feature
          android:glEsVersion="0x00020000"
          android:required="true" /&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>package com.testing.svma;
  
  import android.os.Bundle;
  import android.support.v4.app.FragmentActivity;
  
  public class MainActivity extends FragmentActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
  
      }
  }
  </code></pre>
  
  <p><strong>Reference Documents</strong></p>
  
  <ol>
  <li><p>I used <a href="https://stackoverflow.com/questions/14082851/error-inflating-class-fragment-with-google-map">“Error inflating class fragment” with google map</a> to try and fix my issues.</p></li>
  <li><p>I referenced <a href="https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw" rel="noreferrer">This google maps quick start guide</a> to create my project.</p></li>
  <li><p>I had started initially with <a href="https://developers.google.com/maps/documentation/android/intro" rel="noreferrer">the sample code from the Introduction to the Google Maps Android V2 Api</a></p></li>
  <li><p>A whole slew of SO questions.</p></li>
  </ol>
  
  <p>So, SO Community, what am I doing wrong? Why am I unable to grasp this simple concept.</p>
  
  <p>Thank you in advance.</p>