title: Cannot resolve Mockito dependency in Gradle
body: <p>Although I saw two different posts with this error message nothing worked with me:</p>
  
  <blockquote>
    <p>Error:(25, 17) Failed to resolve: org.mockito:mockito-core:1.10.19</p>
  </blockquote>
  
  <p>I tried to change the Mockito dependency using compile, androidTestCompile and testCompile and in the global Gradle file I tried to add Maven as repository but did not work.</p>
  
  <p>EDIT: I am using Android Studio 2.1</p>
  
  <p>This is my app build.gradle</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 24
  buildToolsVersion "24.0.0"
  
  defaultConfig {
      applicationId "ivano.android.com.mockitoexample"
      minSdkVersion 15
      targetSdkVersion 24
      versionCode 1
      versionName "1.0"
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  }
  
  dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:appcompat-v7:24.2.1'
  testCompile 'junit:junit:4.12'
  testCompile 'org.mockito:mockito-core:1.10.19'
  
  }
  </code></pre>
  
  <p>and this the global one</p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
      repositories {
          jcenter()
      }
  
      dependencies {
          classpath 'com.android.tools.build:gradle:2.1.0'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>