title: Exception while using Uiautomator to capture image/screenshot
body: <p>While using the UiautomatorTestcase class to capture the screenshot of my main activity I am facing the following exception.</p>
  
  <p>The sample code which I'm using</p>
  
  <pre><code>public class MyActivityTest extends UiAutomatorTestCase {
  
      public UiautomatorAdaptxt() {
          // TODO Auto-generated constructor stub
      }
  
      @Override
      protected void setUp() throws Exception {
          // TODO Auto-generated method stub
          super.setUp();
  
      }
  
      public void testOpenMainActivity() throws UiObjectNotFoundException {
          --&gt;Here I use the code to open my Activity&lt;--
          getUiDevice().takeScreenshot(storePath);
      }
  }
  </code></pre>
  
  <p>The exception I'm facing with is </p>
  
  <p>java.lang.NoSuchMethodError: com.android.uiautomator.core.UiDevice.takeScreenshot
          at 
  .testOpenMainActivity(MyActivityTest
  .java:31)
          at java.lang.reflect.Method.invokeNative(Native Method)
          at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java
  :124)
          at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:8
  5)
          at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:76)
          at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
          at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
          at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
          at dalvik.system.NativeStart.main(Native Method)</p>