-1

I am new to android development. Just download and install the android studio and sdk manager files .After creating a new project , android studio is getting an error :

Gradle 'First' project refresh failed Error:Could not get resource 'https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar'.

I have searched a lot but haven't got any answer .Please help to solve this annoying problem .Thanks to advance .

1 Answers1

0

However,I have found a solution for my problem."junit-4.12.jar" was not in that url .So, I have changed in build.gradle .

allprojects {
repositories {
    jcenter()
}

} this block to

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

}

}

And it solved my problem .

  • This is very unlikely. jcenter certainly contains JUnit 4.12: http://jcenter.bintray.com/junit/junit/4.12/ Also you can simply use mavenCentral() and not specify it using the URL. – MartinTeeVarga Mar 03 '17 at 00:15