title: powermock error java.lang.LinkageError: loader constraint violation: when resolving method "android.support.v4.app
body: <p>I am using powermock to test and Android activity</p>
  <pre><code>@RunWith(RobolectricGradleTestRunner.class)
  @Config(constants = BuildConfig.class, sdk = 21)
  @PowerMockIgnore({ &quot;org.mockito.*&quot;, &quot;org.robolectric.*&quot;, &quot;android.*&quot;})
  @PrepareForTest(EpicDetailFragment.class)
  public class ITestActivityTest {
  
      private ITestDemoActivity activity;
  
      private FragmentManager fm;
  
      @Rule
      public PowerMockRule rule = new PowerMockRule();
  
      @Before
      public void initSetup(){
          activity = Robolectric.buildActivity(IGDemoActivity.class).create().get();
          fm = activity.getSupportFragmentManager();
          assertTrue(activity != null);
      }
  
   
  }
  </code></pre>
  <p>Anyway I get the following linkageError</p>
  <pre><code>java.lang.LinkageError: loader constraint violation: when resolving method &quot;android.support.v4.app.FragmentTransaction.add(ILandroid/support/v4/app/Fragment;Ljava/lang/String;)Landroid/support/v4/app/FragmentTransaction;&quot; the class loader (instance of org/powermock/core/classloader/MockClassLoader) of the current class, com/pips/ftse/igdemo/activities/IGDemoActivity, and the class loader (instance of org/robolectric/internal/bytecode/InstrumentingClassLoader) for the method's defining class, android/support/v4/app/FragmentTransaction, have different Class objects for the type android/support/v4/app/Fragment used in the signature
  </code></pre>
  <p>Any idea what this is all about and how to solve it ?</p>
  <p>I thought perhaps the ignore <code>android.*</code> would work but it does not.</p>