title: Can Powermockito be used with Android Studio 1.2
body: <p>I am using Android Studio 1.2 and the <code>com.android.tools.build:gradle:1.2.2</code> plugin.</p>
  
  <h3>Attempt 1</h3>
  
  <p>I include the following in my <code>app/build.gradle</code>:</p>
  
  <pre><code>androidTestCompile ('com.google.dexmaker:dexmaker-mockito:1.2')
  androidTestCompile ('org.powermock:powermock-mockito-release-full:1.6.2')
  </code></pre>
  
  <p>but then the PowerMockito package in not available for import:</p>
  
  <pre><code>error: cannot find symbol
      PowerMockito.mockStatic(DatastoreFactory.class);
      ^
  </code></pre>
  
  <h3>Attempt 2</h3>
  
  <p>I include the following in my <code>app/build.gradle</code>:</p>
  
  <pre><code>androidTestCompile ('org.powermock:powermock-api-mockito:1.6.2') {
      exclude module: 'hamcrest-core'
      exclude module: 'objenesis'
  }
  
  androidTestCompile ('org.powermock:powermock-module-junit4:1.6.2') {
      exclude module: 'hamcrest-core'
      exclude module: 'objenesis'
  }
  </code></pre>
  
  <p>which is a trial-and-error offshoot of this q/a here: <a href="https://stackoverflow.com/questions/25136862/androidstudio-gradle-with-powermock">AndroidStudio/Gradle with powermock</a></p>
  
  <p>This compiles but when run Mockito gives a runtime error:</p>
  
  <pre><code>java.lang.VerifyError: org/mockito/cglib/core/ReflectUtils
      at org.mockito.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:167)
      at org.mockito.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
      at org.mockito.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:217)
      at org.mockito.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
      at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:117)
      at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:109)
      at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:105)
      at org.mockito.cglib.proxy.Enhancer.&lt;clinit&gt;(Enhancer.java:70)
      at org.powermock.api.mockito.repackaged.ClassImposterizer.createProxyClass(ClassImposterizer.java:95)
      at org.powermock.api.mockito.repackaged.ClassImposterizer.imposterise(ClassImposterizer.java:57)
      at org.powermock.api.mockito.repackaged.ClassImposterizer.imposterise(ClassImposterizer.java:49)
      at org.powermock.api.mockito.repackaged.CglibMockMaker.createMock(CglibMockMaker.java:24)
      at org.powermock.api.mockito.internal.mockmaker.PowerMockMaker.createMock(PowerMockMaker.java:45)
      at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:33)
      at org.mockito.internal.MockitoCore.mock(MockitoCore.java:59)
      at org.mockito.Mockito.mock(Mockito.java:1285)
      at org.mockito.Mockito.mock(Mockito.java:1163)
      at com.mdsol.naga.FormPusherTest.setUp(FormPusherTest.java:40)
      at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
      at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
      at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
      at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
  </code></pre>
  
  <p>Is anyone using Powermock successfully with Android Studio 1.2? Please share your <code>build.gradle</code> - thanks!</p>