62

Can somebody explain me please what is the difference between Android Support Repository vs Android Support Library vs Google Repository vs Google Play Services?

My understanding is that Google Repository is identical with Google Play Services just that has separated all the apis (vs the classical play services that is one big jar containing all) and that is better suited to be used in android studio because now you can choose exactly what api you want to compile (eg 'com.google.android.gms:play-services-ads:+') vs relying on proguard to strip away the unneeded apis at build time.

Am I right?

How about Android Support Repository vs Android Support Library?

Behzad Bahmanyar
  • 6,195
  • 4
  • 35
  • 41
Maria
  • 758
  • 1
  • 5
  • 8
  • 1
    It's mostly about the build systems. If you use ant, you copy the library/services package into your project. If you use Gradle, it automatically knows to use the repositories to locate the dependencies you've entered in your build file. – Barend Dec 27 '14 at 08:30

3 Answers3

40

Google Uses the term repository at the end to specify these are Maven Repository and you should import them using a Gradle dependency like this:

dependencies {
   compile "com.google.android.gms:play-services-gcm:8.4.0"
}

But the Gradle build system is only supported in Android Studio, where as Eclipse uses the older Ant build system.

Also mentioned here in google documentation

  1. Select the Android Support Library item.

    Note: If you're developing with Android Studio, select and install the Android Support Repository item instead.

so if you're using the Eclipse IDE use these libraries:

  • Android Support Library
  • Google Play Services

and if you're using Android Studio use these libraries instead:

  • Android Support Repository (New name: Local Maven repository for Support Libraries)
  • Google Repository
Dylan
  • 868
  • 12
  • 21
Behzad Bahmanyar
  • 6,195
  • 4
  • 35
  • 41
16

By the SDK Manager: enter image description here

  • Android Support Repository: it is a local Maven repository for libraries of android.support.* (comprise all versions) enter image description here

  • Android Support Library: always the same libraries as above, for android.support.*, just one version, (in the form of a structure of an android project). It is no longer available from the SDK Manager !!! enter image description here

  • Google Repository: it is a Maven repository for some google libraries google.* enter image description here

  • Google Play Services: this is the docs and samples for working with the GooglePlay Service (a kind of app or runtime) running on Android device. enter image description here

Zanna
  • 676
  • 9
  • 13
14

Android Support Library and Google Play Services are the libraries themselves (jar + src), while Android Support Repository and Google Repository are the corresponding local Maven repositories (aar files).

Coincidentally they exploded the APIs, but this is not the main thing about it.

Official page:

Adding SDK Packages

Herrbert74
  • 2,578
  • 31
  • 51
  • Whats the exact reason for splitting up the two? Why not make Support Library obsolete and go for Support Repository? – powder366 Oct 04 '15 at 18:36
  • 3
    That's the point, it's not the same thing. Support Repository is a new way (gradle + maven) to get the Support Library. – Herrbert74 Oct 05 '15 at 21:40