title: error while inflating XML in Google maps fragment
body: <p>trying to display Google map using a fragment. Used the following <a href="https://developers.google.com/maps/documentation/android/start" rel="nofollow noreferrer">page</a> as a tutorial. </p>
  
  <p>I am getting the exception "Error Inflating class fragment ".</p>
  
  <p>1) Imported the jar google-play-services.jar</p>
  
  <p>2) downloaded and configured the google play services SDK.</p>
  
  <p>3) got the latest v2 API Key.</p>
  
  <p>4) Added permission com.google.android.providers.gsf.permission.READ_GSERVICES in the manifest.</p>
  
  <p>5) using mindsdk = 8 and target = 16.</p>
  
  <p>For a reference, <code>Androidmanifest.xml</code> : </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.com.mapsdemo"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-feature android:glEsVersion="0x00020000" android:required="true"/&gt;
  
  &lt;permission
  android:name="com.example.com.mapsdemo.permission.MAPS_RECEIVE"
  android:protectionLevel="signature"/&gt;
  &lt;uses-permission android:name="com.example.com.mapsdemo.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-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="16" /&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.com.mapsdemo.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="AIzaSyDXPsxWF634gd907NzZKkRkNS0oH9IPWgk"/&gt;
  
  
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p><code>MainActivity.java</code></p>
  
  <pre><code>package com.example.com.mapsdemo;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.view.Menu;
  import android.widget.Toast;
  
  import com.google.android.gms.common.GooglePlayServicesUtil;
  
  
  //API : AIzaSyDXPsxWF634gd907NzZKkRkNS0oH9IPWgk
  
  public class MainActivity extends Activity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
  
      try {
      setContentView(R.layout.activity_main);
      } catch (Exception e) {
  
      Toast.makeText(this, e.toString(), Toast.LENGTH_LONG).show();
      }
  
  
  
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.activity_main, menu);
      return true;
  }
  
  }
  </code></pre>
  
  <p><code>activity_main.xml</code></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.MapFragment"/&gt;
  </code></pre>
  
  <p>Logcat :</p>
  
  <pre><code>01-02 18:31:21.477: I/jdwp(11473): Ignoring second debugger -- accepting and dropping
  01-02 18:31:24.493: D/libEGL(11871): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
  01-02 18:31:24.493: D/libEGL(11871): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
  01-02 18:31:24.509: D/libEGL(11871): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
  01-02 18:31:24.602: D/OpenGLRenderer(11871): Enabling debug mode 0
  </code></pre>