我的环境如下:android studio 2.3
第一次启动工程,studio 会编译junit 这个包
网上有很多解决方法,有的人是在build.gradle 中这样改动:
repositories {
maven { url 'http://repo1.maven.org/maven2' }
jcenter { url "http://jcenter.bintray.com/" }
}
或者注释掉:
testCompile 'junit:junit:4.12'
正确的决解是将
testCompile ---> androidTestCompile
如图: