title: How to use PowerMock in Android projects?
body: <p>I created a new Android test project.  I downloaded powermock-mockito-junit-1-1.5.zip from <a href="https://code.google.com/p/powermock/downloads/list">https://code.google.com/p/powermock/downloads/list</a>.  I added all of the libraries to the test project's <code>libs</code> folder. The test class is a very simple object:</p>
  
  <pre><code>package com.test.test;
  
  import org.junit.runner.RunWith;
  import org.powermock.modules.junit4.PowerMockRunner;
  
  import android.util.Log;
  
  @RunWith(PowerMockRunner.class)
  public class TestTestAndroid {
  
      public void testRuns() {
          Log.e("test", "Test case is called");
      }
  }
  </code></pre>
  
  <p>Then, I try running the project from Eclipse, or making the project from the command line.  I get the same error:</p>
  
  <p><code>Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/hamcrest/Description;</code></p>
  
  <p>As it turns out, both <code>junit-4.8.2.jar</code> and <code>mockito-all-1.9.5.jar</code> define <code>org.hamcrest.Description</code>.  I must include the Mockito jar for obvious reasons - I need Mockito.  A different version of JUnit is provided by Android, but it is an old version that does not include the <code>@RunWith</code> annotation.</p>
  
  <p>Can someone answer how to use powermock and mockito in an Android project, without the conflicting <code>org.hamcrest.Description</code> problem?</p>