2018-06-12 AndroidStudio Failed to resolve: junit

在module:gradle文件中添加

repositories {
    maven { url 'http://repo1.maven.org/maven2' } // 其实是 mavenCentral()
}

然后在project:gradle文件中

buildscript {
    repositories {
        maven { url 'http://repo1.maven.org/maven2' }
    }
}

allprojects {
    repositories {
        maven { url 'http://repo1.maven.org/maven2' }
    }
}

你可能感兴趣的:(2018-06-12 AndroidStudio Failed to resolve: junit)