Android SDK Manager notified me this morning that there was a new Google Play Services release to download: revision 18. So how do I find the corresponding long version number to put in my build.gradle file? All my test devices are running version 5.0.84, so I tried updating
compile 'com.google.android.gms:play-services:4.4.52'
to
compile 'com.google.android.gms:play-services:5.0.84'
But that resulted in an error:
Gradle 'MyApp' project refresh failed: Could not find com.google.android.gms:play-services:5.0.84. Required by: {my app} Gradle settings
I'm running Android Studio 0.5.2 and building for API19 (I haven't upgraded to Android L/API20 yet): maybe that's the issue? But in general, how do you match a revision number shown in SDK Manager (e.g. 18) with a version code for build.gradle (e.g. 5.0.84)?
Here's my full build.gradle in case it helps:
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
// Avoid "Duplicate files copied in APK" errors when using Jackson
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}
dependencies {
// Was "compile 'com.android.support:support-v4:+'" but this caused build errors when L SDK released
compile 'com.android.support:support-v4:19.1.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
// Support for Google Cloud Messaging
// Was "compile 'com.android.support:appcompat-v7:+'" but this caused build errors when L SDK released
compile 'com.android.support:appcompat-v7:19.1.0'
compile 'com.google.android.gms:play-services:5.0.84'
// Jackson
compile 'com.fasterxml.jackson.core:jackson-core:2.3.3'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.3.3'
compile 'com.fasterxml.jackson.core:jackson-databind:2.3.3'
}