title: Android Error testing app using Mock Location
body: <p>I'm trying to test my Android location based app. </p>
  
  <p>It would be very useful if I could mock location data from providers in unit tests. But I can't add <code>ACCESS_MOCK_LOCATION</code> permission to <code>androidManifest.xml</code> because when I do so it gives me an error:</p>
  
  <blockquote>
    <p>Mock locations should only be requested in a debug-specific manifest file (typically src/debug/AndroidManifest.xml)
    Using a mock location provider (by requiring the permission
    android.permission.ACCESS_MOCK_LOCATION) should only be done in debug
    builds. In Gradle projects, that means you should only request this
    permission in a debug source set specific manifest file.  To fix this,
    create a new manifest file in the debug folder and move the
     element there. A typical path to a debug manifest
    override file in a Gradle project is src/debug/AndroidManifest.xml.</p>
  </blockquote>
  
  <p>But I when add <code>AndroidManifest.xml</code> to <code>src/androidTest</code> directory - it just ignores it when testing. </p>
  
  <p>What am I doing wrong?</p>