Failed to resolve: junit:junit:4.12
What is the solution to this problem I have tried several solutions
Failed to resolve: junit:junit:4.12
What is the solution to this problem I have tried several solutions
You most probably forgot to specify a repository where dependencies should be looked for.
Add for example
repositories {
mavenCentral()
}
or
repositories {
jcenter()
}
to your build script and junit will resolve properly.
If not, please post more information like your build script, and the outut of the Gradle run with using -i
to get info level logging.
Btw. please read and obey http://stackoverflow.com/help/how-to-ask and https://stackoverflow.com/help/someone-answers for the future.
You can simply remove that from Gradle and download this file http://www.java2s.com/Code/JarDownload/junit/junit-4.9.jar.zip or latest version found on there site and add it as library to Gradle and again build the project and it's all done.
This problem may be because. Gradle may be unable to find that, but after adding that downloaded file to your project. You are good to go.