Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using jcenter and mavenCentral both in Android Studio

I am new to Android Studio. I am using libraries in my project. The maven central has updated version of facebook sdk, while rest of libraries I am using are available on jcenter. I want to know if we can use both these repositories in our project. If yes, then how do I need it to define in gradle file so that studio downloads aar from correct location. Any example would be helpful.

like image 476
Nitish Kumar Avatar asked Aug 12 '15 09:08

Nitish Kumar


2 Answers

and for maven just add to your pom.xml:

<repositories>
    <repository>
      <id>jcenter</id>
      <url>https://jcenter.bintray.com/</url>
    </repository>
</repositories>
like image 82
erank Avatar answered Sep 28 '22 14:09

erank


You never need both. JCenter is a superset of Maven Central, and it should suffice for all the dependencies.


I am with JFrog, the company behind Bintray and [artifactory], see my profile for details and links.

like image 24
JBaruch Avatar answered Sep 28 '22 15:09

JBaruch