title: Gradle project sync failed after updating the Android Studio and Gradle
body: <p>After applying the update of Gradle to version <code>3.3.0</code> in Android Studio an error occurred while syncing Gradle regarding the junit 4.12. </p>
  
  <p>The error is : Could not find method testImplementation() for arguments [junit:junit:4.12] on object of type `org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.</p>
  
  <p>There was no error before update. The error occurs when I add the last three dependencies (junit, test runner, test espresso) to the gradle file. I've look at the previous questions but couldn't find a solution yet. Here is my gradle files:</p>
  
  <p><strong>Project Gradle File</strong></p>
  
  <pre><code>buildscript {
  
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.3.0'
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
          maven { url "https://jitpack.io" }
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p><strong>App Gradle File</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.example.hhs.haberler"
          minSdkVersion 15
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          vectorDrawables.useSupportLibrary = true
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support:design:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      implementation 'com.android.support:support-v4:28.0.0'
      implementation 'com.android.support:cardview-v7:28.0.0'
      implementation 'com.android.support:recyclerview-v7:28.0.0'
      implementation 'com.android.support:customtabs:28.0.0'
      implementation 'com.android.support:preference-v7:28.0.0'
  
      implementation "android.arch.lifecycle:extensions:1.1.1"
      implementation 'com.android.support:support-vector-drawable:28.0.0'
      annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
      implementation "android.arch.persistence.room:runtime:1.1.1"
      annotationProcessor "android.arch.persistence.room:compiler:1.1.1"
  
      implementation 'com.google.code.gson:gson:2.8.5'
      implementation 'com.squareup.retrofit2:retrofit:2.4.0'
      implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
      implementation 'com.squareup.picasso:picasso:2.71828'
      implementation 'com.github.curioustechizen.android-ago:library:1.4.0'
      implementation 'de.hdodenhof:circleimageview:2.2.0'
      implementation 'com.github.bumptech.glide:glide:4.8.0'
      annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
      implementation 'com.github.chrisbanes:PhotoView:2.1.4'
      implementation 'gr.pantrif:easy-android-splash-screen:0.0.1'
  
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso- core:3.0.2'
  }
  </code></pre>