-2

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 enter image description here

1
  • show log message here and gradle file Commented Apr 19, 2016 at 10:40

3 Answers 3

1

You should check your gradle files and write down mavenLocal() at the build.gradle(Project: your project name)

allprojects { repositories { jcenter() mavenLocal() } 

}

Sign up to request clarification or add additional context in comments.

Comments

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.

3 Comments

I added to Gradle repositories { mavenCentral() } But still get the error
this library is not supported on android studio, use its jar file.
also this library is deprecated, no more support, you may use google official API.
-1

mavenCentral(); just add ";".I solve it by this way.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.