title: Unable to find resource ID when building fragment with Robolectric
body: <p>Using Robolectric 3.3.2 I am trying to build a fragment and attach it to an activity. I tried <code>Robolectric.buildFragment(MyFragment.class, MyActivity.class).create()</code> but I get exception <code>android.content.res.Resources$NotFoundException: Unable to find resource ID #0x1 in packages [android, com.my.package.for.android]</code>.</p>
  
  <p>I also tried building the activity and fragment separately and attach the fragment using the fragment manager but it seems that the fragment is automatically attached to a dummy activity so I cannot attach it to my activity.</p>
  
  <p>Minimalistic example:</p>
  
  <pre><code>@RunWith(RobolectricTestRunner.class)
  @Config(sdk = Build.VERSION_CODES.KITKAT, manifest = "./src/main/AndroidManifest.xml")
  public class MyTest {
  
      @Test
      public void WorkingTest1() throws Exception {
          Robolectric.buildFragment(MyFragment.class).create();
      }
  
      @Test
      public void WorkingTest2() throws Exception {
          Robolectric.buildActivity(MyActivity.class).create();
      }
  
      @Test
      public void FailingTest() throws Exception {
          Robolectric.buildFragment(MyFragment.class, MyActivity.class).create();
      }
  
      public static class MyActivity extends Activity {
      }
  
      public static class MyFragment extends Fragment {
      }
  
  }
  </code></pre>