Reputation: 10831
While reading Setting Up Google Play Services for Android Studio, I read:
Add a new build rule under dependencies for the latest version of play-services. For example:
dependencies {
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:7.3.0'
}
However, the article didn't say how to determine the latest version of play-services.
Android SDK Manager doesn't provide this information:
How do you find out what versions of the play services library are installed?
Upvotes: 0
Views: 348
Reputation: 10831
On OS X, the libraries are installed under ~/Library/Android/sdk/extras
. You can list the libraries with their versions using:
pushd ~/Library/Android/sdk/extras > /dev/null; find . | egrep '([0-9]+\.){2}[0-9]+$'; popd > /dev/null
which will produce a listing like:
./google/m2repository/com/google/android/gms/play-services/7.0.0
./google/m2repository/com/google/android/gms/play-services/7.3.0
./google/m2repository/com/google/android/gms/play-services-ads/6.5.87
./google/m2repository/com/google/android/gms/play-services-ads/7.0.0
./google/m2repository/com/google/android/gms/play-services-ads/7.3.0
Note, you'll have to put colons in the right places to transforms these directory listings into Gradle compile statements. For example, play-services in the listing above becomes:
compile 'com.google.android.gms:play-services:7.3.0'
Upvotes: 1