ERROR: Failed to resolve: xxx.xx Add Google Maven repository and sync project

问题描述:

ERROR: Failed to resolve: com.android.support.test.espresso:espresso-core:2.2.2
Add Google Maven repository and sync project

解决:

  1. build.gradle

    buildscript {
        repositories {
            jcenter()
            maven {
                url "https://maven.google.com"
            }
        }
        ...
    }
    

或者

  1. build.gradle(Project)

    allprojects {
        repositories {
            jcenter()
            maven {
                url "https://maven.google.com"
            }
        }
    }
    

你可能感兴趣的:(Gradle)