title: Android Google Map - Error inflating class fragment
body: <p>I am trying to show <code>GoogleMap</code> on my <code>Activity</code>. I have done all necessary steps including key generation, linked <code>google-play-services_lib</code>, added <code>android-support-v4.jar</code>. But I am facing an error because of <code>Fragment</code>. I have tried many solutions, spent many hours but unable to solve this problem. Please help me. </p>
  
  <p><strong>MapActivity.java</strong></p>
  
  <pre><code>package com.example.classified_android_app;
  
  import android.os.Bundle;   
  import android.support.v4.app.FragmentActivity;
  
  public class MapActivity extends FragmentActivity {
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.map);
      }
  }
  </code></pre>
  
  <p><strong>map.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;fragment
          xmlns:map="http://schemas.android.com/apk/res-auto"
          android:id="@+id/map"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          class="com.google.android.gms.maps.SupportMapFragment"
          map:cameraTargetLat="17.660324"
          map:cameraTargetLng="75.906601"
          map:cameraZoom="15" &gt;
      &lt;/fragment&gt;
  
  &lt;/RelativeLayout&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.example.classified_android_app"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:maxSdkVersion="19"
          android:minSdkVersion="16"
          android:targetSdkVersion="19" /&gt;
  
      &lt;permission
          android:name="com.example.classified_android_app.permission.MAPS_RECEIVE"
          android:protectionLevel="signature" /&gt;
  
      &lt;uses-permission android:name="com.example.classified_android_app.permission.MAPS_RECEIVE" /&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-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="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&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.geo.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;activity
              android:name=".MapActivity"
              android:label="Google Map"
              android:theme="@style/MyTheme" &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;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p><strong>Log</strong></p>
  
  <pre><code>06-21 09:54:08.592: W/dalvikvm(13704): threadid=1: thread exiting with uncaught exception (group=0x4191d908)
  06-21 09:54:08.630: E/AndroidRuntime(13704): FATAL EXCEPTION: main
  06-21 09:54:08.630: E/AndroidRuntime(13704): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.classified_android_app/com.example.classified_android_app.MapActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at android.app.ActivityThread.access$600(ActivityThread.java:149)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at android.os.Handler.dispatchMessage(Handler.java:99)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at android.os.Looper.loop(Looper.java:153)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at android.app.ActivityThread.main(ActivityThread.java:4987)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at java.lang.reflect.Method.invokeNative(Native Method)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at java.lang.reflect.Method.invoke(Method.java:511)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at dalvik.system.NativeStart.main(Native Method)
  06-21 09:54:08.630: E/AndroidRuntime(13704): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  06-21 09:54:08.630: E/AndroidRuntime(13704):    at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
  </code></pre>