3

What are repositories in Android? Are maven and google repositories same? How can I implement them in my application and how do they work in the background of any android development?

Tanmay Bairagi
  • 564
  • 5
  • 25
  • Hello Tanmay, did my explanation help answer your questions? If you were able to find my answer useful, please mark it as accepted so that others who have similar questions can read it as well. – Ishaan Javali Nov 22 '18 at 22:26
  • Tanmay, if my answer helped you please mark it as accepted. – Ishaan Javali Nov 23 '18 at 18:33

1 Answers1

2

Repositories in Android are file archives and web hosting facilities which contain a large amount of source code for web pages and for software. A repository generally refers to a place where data is stored and maintained.

Maven is a tool developed by Apache to serve as a file server to distribute libraries. The Google repository is a Maven repository for some Google libraries.

To implement them, you would go into your app level build.gradle file and add the following under buildscript and repositories:

repositories {
    google()
    jcenter()
    maven {
        url 'https://maven.fabric.io/public'
    }
}

jcenter() is another repository. It is the largest repository in the world for Java and Android Open Source Software (OSS) Libraries. I hoped this answered your question.

Ishaan Javali
  • 1,711
  • 3
  • 13
  • 23
  • Thank you Ishaan! your answer is clear to understand. If there could be in depth explanation that how repositories applied and work in background of any android application, it would be highly appretiated. – Tanmay Bairagi Mar 11 '19 at 15:34
  • I think that [this link](https://stackoverflow.com/questions/6149725/how-does-the-android-repo-manifest-repository-work/11870480) should answer your question. If you found my answer useful, please mark it as accepted. – Ishaan Javali Mar 11 '19 at 16:54