title: Android crashing at getSupportFragmentManager()
body: <p>I decided to switch from multiple activities to one activity which switches between fragments however the application now crashes.</p>
  
  <p>Here is the activity I am adding the fragment to</p>
  
  <p>public class MainActivity extends SherlockFragmentActivity{</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      MyFragment fragment = new MyFragment();
  
      fragment.setArguments(getIntent().getExtras());
  
      getSupportFragmentManager().beginTransaction()
      .add(R.id.fragment_container, fragment).commit();
  
  }
  </code></pre>
  
  <p>Here is the fragment its an observer and has functionality but to save space ill just show the creation</p>
  
  <pre><code>public class MyFragment  extends SherlockFragment implements Observer{
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, 
          Bundle savedInstanceState) {
  
          // Inflate the layout for this fragment
          return inflater.inflate(R.layout.my_fragment, container, false);
      }
  </code></pre>
  
  <p>Heres my_fragment.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/my_fragment"
  android:layout_width="match_parent"
  android:layout_height="match_parent" &gt;
  
  ... HAS SOME TEXT VIEWS HERE!
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>The crash I get is </p>
  
  <pre><code>02-15 16:17:41.079: E/AndroidRuntime(18668): FATAL EXCEPTION: main
  02-15 16:17:41.079: E/AndroidRuntime(18668): java.lang.RuntimeException: 
  Unable to start activity ComponentInfo{com.example.myapp/com.example.myapp.MainActivity}: 
  java.lang.IllegalArgumentException: 
  No view found for id 0x7f040036 for fragment MyFragmentt{41a05910 #0 id=0x7f040036}
  </code></pre>
  
  <p>Can anyone help me out here? I can't really figure out what is causing this. I know if I comment out getSupportFragmentManager() in main activity  (the top code block in this post) it will run just not draw anything in my fragment.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The frame_container which I'm not sure where to place</p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/fragment_container"
  android:layout_width="match_parent"
  android:layout_height="match_parent" /&gt;
  </code></pre>