4

Because of problem that jcenter() remove some older libs I decide to update my project. So now I have:

 gradle: 4.6

and:

classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:3.0.0'

I almost solve every dependency but I get

Failed to resolve: monitor

without any clue what is that monitor ;(

LunaVulpo
  • 3,043
  • 5
  • 30
  • 58
  • I have already answered the question at the following link. Check it and do let me know if that solves your error: https://stackoverflow.com/a/52992335/9494420 – Abhishek Luthra Oct 26 '18 at 08:01

4 Answers4

8

Same for me. It works If I comment espresso libraries and:

androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test:rules:1.0.2'

I´ve found a solution. Put google() at the beggining in

buildscript { repositories { google()

and

allprojects { repositories { google()

in project gradlew

4

On my project, when I remove the dependencies:

androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

This error is gone. Good luck!

cV2
  • 5,229
  • 3
  • 43
  • 53
1

I suffered the same issue due to espresso-core. However I resolved the issue. Try to change your build.gradle as given below:-

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2',{
    exclude group: 'com.android.support', module: 'support-annotations'
})
}
0

Find another post solve the issue, here is the link https://stackoverflow.com/a/52981328/4172325

I choose Solution 1 as it supports Android Test.