title: How to install/import AndroidJunitRunner
body: <p>Following instructions at <a href="https://code.google.com/p/android-test-kit/wiki/EspressoSetupInstructions" rel="noreferrer">https://code.google.com/p/android-test-kit/wiki/EspressoSetupInstructions</a> I added the lines </p>
  
  <pre><code>androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'
  androidTestCompile 'com.android.support.test:runner:0.3'
  </code></pre>
  
  <p>to my gradle build file, and </p>
  
  <pre><code>testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  </code></pre>
  
  <p>The aar files are available in </p>
  
  <pre><code>/{sdk_home}/extras/android/m2repository
  </code></pre>
  
  <p>Apparently, that doesn't mean that gradle can now find them. How do I tell gradle to look for the files there, or how do I create the dependency? Putting the aar files in my libs dir and importing them from there doesn't work. Doesn't work for aar files in general. </p>
  
  <p>This is my gradle build file: </p>
  
  <pre><code>repositories {
  mavenCentral() // this or jcenter() required for testing-support-lib dependencies
  mavenLocal()
  }
  
      apply plugin: 'com.android.application'
  apply plugin: 'findbugs'
  
  android {
      compileSdkVersion 22
      buildToolsVersion "22.0.1"
  
  defaultConfig {
      applicationId "com.loqli.android"
      minSdkVersion 18
      targetSdkVersion 22
      multiDexEnabled = true
  
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  }
  
  packagingOptions {
      exclude 'META-INF/LICENSE'
      exclude 'META-INF/LICENSE.txt'
      exclude 'META-INF/NOTICE.txt'
      exclude 'META-INF/NOTICE'
      exclude 'META-INF/DEPENDENCIES'
  }
  
     sourceSets {
          main {
              java.srcDirs = ['src/main/java']
              resources.srcDirs = ['src/main/res']
          }
          androidTest {
              java.srcDirs = ['src/test/java']
              resources.srcDirs = ['src/test/res']
          }
      }
  
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
      }
  }
  
  dexOptions {
      incremental true
      javaMaxHeapSize "4096M"
  }
  
  }
  
  dependencies {
  
  wearApp project(':wear')
  
  compile 'com.android.support:support-v4:+'
  compile 'com.google.android.gms:play-services-wearable:+'
  
  compile 'com.android.support:support-annotations:22.2.0'
  
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile fileTree(dir: 'libs/roboguice', include: ['*.jar'])
  
  //androidTestCompile 'junit:junit:4.12'
  androidTestCompile 'org.mockito:mockito-core:1.10.19'
  androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'
  
  androidTestCompile 'com.android.support.test:runner:0.3'
  }
  </code></pre>
  
  <p>edit: updated gradle build file</p>