I want to add some third-party libraries, but I always got the "Failed to resolve" error.
I tried some suggestions I found here, like:
Error:(23, 17) Failed to resolve: junit:junit:4.12 ,
Gradle failed to resolve library in Android Studio
and Gradle in Android Studio: Failed to resolve third-party libraries
but it didn't work! how can I solve the problem? thanks in advance
Asked
Active
Viewed 547 times
-2

Community
- 1
- 1

TeachMePls
- 197
- 1
- 2
- 11
-
show log message here and gradle file – Bajirao Shinde Apr 19 '16 at 10:40
3 Answers
1
You should check your gradle files and write down mavenLocal() at the build.gradle(Project: your project name)
allprojects {
repositories {
jcenter()
mavenLocal()
}
}

YOUNG MIN CHO
- 253
- 1
- 3
- 13
0
libraries which you want to add are at maven or at any other repository, you need to add repository. so that gradle can download library from that repository.
let me know if you need more help.

Developine
- 12,483
- 8
- 38
- 42
-
I added to Gradle repositories { mavenCentral() } But still get the error – TeachMePls Apr 19 '16 at 13:15
-
-
also this library is deprecated, no more support, you may use google official API. – Developine Apr 20 '16 at 05:58