title: Android SupportMapFragment can't see map inside a fragment
body: <p>I'm trying to add a SupportMapFragment into a FrameLayout in my code but i get a Null Pointer Exeption.</p>
  
  <p><strong>My Code:</strong></p>
  
  <p><strong>MainFragment:</strong></p>
  
  <pre><code>public class MainFragment extends FragmentActivity{
  
      @Override
      protected void onCreate(Bundle arg0) {
          super.onCreate(arg0);       
          setContentView(R.layout.activity_main);             
          FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
          ft = getSupportFragmentManager().beginTransaction();
          SecondFragment second = new SecondFragment();
          ft.add(R.main_activity.frame, second);
          ft.addToBackStack(null);
          ft.commit();
      }       
  }
  </code></pre>
  
  <p><strong>SecondFragment:</strong></p>
  
  <pre><code>public class SecondFragment extends SupportMapFragment {
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          return inflater.inflate(R.layout.activity_map, null);       
      }
  }
  </code></pre>
  
  <p><strong>My XML:</strong></p>
  
  <p><strong>activity_main:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
      &lt;include
          android:layout_width="fill_parent"
          android:layout_height="0dp"
          android:layout_weight="1"
          layout="@layout/header" /&gt;
  
      &lt;FrameLayout
          android:layout_width="fill_parent"
          android:layout_height="0dp"
          android:layout_weight="7.06" 
          android:id="@+main_activity/frame"
          android:background="@drawable/defaultbg"/&gt;
  
      &lt;include
          android:layout_width="fill_parent"
          android:layout_height="0dp"
          android:layout_gravity="bottom"
          android:layout_weight="1"
          layout="@layout/footer" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>activity_map:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" &gt;
  
      &lt;fragment        
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          class="com.google.android.gms.maps.SupportMapFragment"/&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p><strong>My Logcat:</strong></p>
  
  <pre><code>03-07 21:20:17.160: E/AndroidRuntime(1617): FATAL EXCEPTION: main
  03-07 21:20:17.160: E/AndroidRuntime(1617): java.lang.RuntimeException: Unable to resume activity {com.WhosAround/com.WhosAround.MainFragment}: java.lang.NullPointerException
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2124)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2139)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1672)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.os.Handler.dispatchMessage(Handler.java:99)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.os.Looper.loop(Looper.java:130)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.app.ActivityThread.main(ActivityThread.java:3691)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at java.lang.reflect.Method.invokeNative(Native Method)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at java.lang.reflect.Method.invoke(Method.java:507)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at dalvik.system.NativeStart.main(Native Method)
  03-07 21:20:17.160: E/AndroidRuntime(1617): Caused by: java.lang.NullPointerException
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at maps.z.r.onResume(Unknown Source)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at com.google.android.gms.maps.internal.IMapFragmentDelegate$Stub.onTransact(IMapFragmentDelegate.java:115)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.os.Binder.transact(Binder.java:279)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at com.google.android.gms.maps.internal.IMapFragmentDelegate$a$a.onResume(Unknown Source)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at com.google.android.gms.maps.SupportMapFragment$a.onResume(Unknown Source)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at com.google.android.gms.internal.e$1.a(Unknown Source)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at com.google.android.gms.internal.e.a(Unknown Source)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at com.google.android.gms.internal.e.onResume(Unknown Source)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at com.google.android.gms.maps.SupportMapFragment.onResume(Unknown Source)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.support.v4.app.Fragment.performResume(Fragment.java:1503)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:947)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1070)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.support.v4.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:1871)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.support.v4.app.FragmentActivity.onResumeFragments(FragmentActivity.java:455)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.support.v4.app.FragmentActivity.onPostResume(FragmentActivity.java:444)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.app.Activity.performResume(Activity.java:3867)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2114)
  03-07 21:20:17.160: E/AndroidRuntime(1617):     ... 12 more
  </code></pre>