android - Why does the Google maven repository exist and when should I use it? -


so found myself scratching head trying update build.gradle dependencies. com.android.support:appcompat library version 26.0.2 didnt resolve. after bit of searching learned had add google's maven repository list of repositories in project gradle file. both google's maven repository , jcenter() listed.

so why google hosting own maven repository , there reason not use it? odd libraries hosted both places different versions.

there several repositories in play when building android app:

  • jcenter() used multitude of open source libraries, including android plugin gradle.

  • google() (a.k.a., maven.google.com) used support libraries, architecture components, , on. support libraries, need use repository 26.0.0 , higher.

  • the android repository, installed on hard drive sdk manager, support libraries prior introduction of maven.google.com.

  • many other hosted repositories (jitpack.io, cwac repository, etc.).

its odd libraries hosted both places different versions.

i don't know if maven.google.com supports library versions android repository. otherwise, speaking, maven.google.com new hosted version of had been android repository, newer versions of libraries going forward.

i'm uncertain if google repository installed sdk manager play services dependencies being supplanted maven.google.com.

why google hosting own maven repository

you have ask google. android repository ok simple builds got pain in more complex scenarios (e.g., builds on headless ci server). using ordinary hosted maven repository should simplify things.

the template project generated android studio didnt add google's maven repository

you using android studio 2.3.3 or older. android studio 3.0 , higher's templates add google() you.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -