From:https://blog.csdn.net/z1101558280/article/details/52450149
In fact, this error is not deceiving like the testCompile 'junit: junit: 4.12' commented out or removed, with clear reasons and solutions in stackoverflow, simply add maven {url 'http in the Application of gradle file: // repo1 .maven.org / maven2 '}
problem solved. Add a location shown below