Android Studio reports the error Could not resolve junit:junit4.12

Android Studio reported the error Could not resolve junit:junit4.12 solution.

 

step1:

Find the build.gradle(Module:app) file

 

step2:

option1:testCompile 'junit:junit:4.12'

 

option2: do not delete the above statement, add

repositories {

    maven { url 'http://repo1.maven.org/maven2' }
    jcenter { url "http://jcenter.bintray.com/" }
}

step3:

 

Save the file and recompile the build project

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326347653&siteId=291194637