title: Map Fragment With navigation drawer
body: <blockquote>
    <p>i 've tried to make the map fragment first thing to show up but nothing worked
    when i try to change the position force close shows up then i got back to launch 
    activity directly without pressing any thing</p>
    
    <blockquote>
      <p>Here the error:</p>
    </blockquote>
  </blockquote>
  
  <pre><code>        01-28 21:02:44.289: E/AndroidRuntime(27684): FATAL EXCEPTION: main
      01-28 21:02:44.289: E/AndroidRuntime(27684): android.view.InflateException: Binary XML file line #1: Error inflating class fragment
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at com.pickmeup.maps.MapActivity.onCreateView(MapActivity.java:33)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.app.Fragment.performCreateView(Fragment.java:1785)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:887)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1037)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.app.Activity.onCreateView(Activity.java:4797)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at com.pickmeup.maps.MapActivity.onCreateView(MapActivity.java:33)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.app.Fragment.performCreateView(Fragment.java:1785)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:887)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1059)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.app.BackStackRecord.run(BackStackRecord.java:682)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1437)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.os.Handler.handleCallback(Handler.java:725)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.os.Handler.dispatchMessage(Handler.java:92)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.os.Looper.loop(Looper.java:158)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.app.ActivityThread.main(ActivityThread.java:5751)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at java.lang.reflect.Method.invokeNative(Native Method)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at java.lang.reflect.Method.invoke(Method.java:511)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at dalvik.system.NativeStart.main(Native Method)
      01-28 21:02:44.289: E/AndroidRuntime(27684): Caused by: java.lang.IllegalArgumentException: Binary XML file line #1: Duplicate id 0x7f05002a, tag null, or parent id 0x7f05001a with another fragment for com.google.android.gms.maps.MapFragment
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.app.Activity.onCreateView(Activity.java:4783)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
      01-28 21:02:44.289: E/AndroidRuntime(27684):    ... 26 more
  </code></pre>
  
  <blockquote>
    <blockquote>
      <p>MapActivity.java</p>
    </blockquote>
  </blockquote>
  
  <pre><code>            public class MapActivity extends Fragment {
          private GoogleMap mMap;
          public View onCreateView(LayoutInflater inflater, ViewGroup container,
                  Bundle savedInstanceState) {
  
              View rootView = inflater.inflate(R.layout.map_fragment, container, false);
              setUpMapIfNeeded();
              return rootView;
          }
  
          private void setUpMapIfNeeded() {
  
              if (mMap == null) {
  
                  mMap = ((MapFragment) getFragmentManager().findFragmentById(
                          R.id.map)).getMap();
  
                  if (mMap != null) {
                      setUpMap();
                  }
              }
          }
  
          private void setUpMap() {
              mMap.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title(
                      "Marker"));
          }
      }
  </code></pre>
  
  <blockquote>
    <blockquote>
      <p>map_fragment.xml</p>
    </blockquote>
  </blockquote>
  
  <pre><code>    &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>
  
  <blockquote>
    <blockquote>
      <p>here selectitem </p>
    </blockquote>
  </blockquote>
  
  <pre><code>            android.app.Fragment mapfragment = new MapActivity();
  
      Fragment fragment = new PlanetFragment();
      Bundle args = new Bundle();
      args.putInt(PlanetFragment.ARG_PLANET_NUMBER, position);
      fragment.setArguments(args);
  
      mapfragment.getFragmentManager();
      android.app.FragmentManager fragmentManager = getFragmentManager();
      fragmentManager.beginTransaction()
              .replace(R.id.content_frame, mapfragment).commit();
  </code></pre>
  
  <blockquote>
    <blockquote>
      <p>mainfest.xml</p>
    </blockquote>
  </blockquote>
  
  <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.android.navigationdrawerexample"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:maxSdkVersion="19"
      android:minSdkVersion="14"
      android:targetSdkVersion="17" /&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.ACCESS_FINE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="com.pickmeup.mapstrial.permission.MAPS_RECEIVE" /&gt;
  &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&gt;
  
  &lt;uses-feature
      android:glEsVersion="0x00020000"
      android:required="true" /&gt;
  
  &lt;permission
      android:name="com.pickmeup.maps.permission.MAPS_RECEIVE"
      android:protectionLevel="signature" &gt;
  &lt;/permission&gt;
  
  &lt;application
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@android:style/Theme.Holo.Light.DarkActionBar" &gt;
      &lt;activity
          android:name="com.pickmeup.gui.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="AIzaSyDRCTjlHnNX96nzN9PA69SYt7ZlqWGpsZ4" /&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p>thanks in advance </p>