Reputation: 8951
I need the google-play-services library and I am using Android Studio.
But when I sync my project it says:
could not found com.google.android.gms:play-services:3.1.36
I thinks the 3.1.36 version is an old one and I dunno the right version.
What should I do ?
Upvotes: 10
Views: 13058
Reputation: 18699
Go to File -> Project Structure -> Select Project Settings -> Select 'Dependencies' Tab Click '+' -> 1.Library Dependencies -> Select com.google.android.gms:play-services:+
This will add the latest version of Google Play Services
Upvotes: 1
Reputation: 115
is this how you are adding the dependency???
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
dependencies {
compile 'com.android.support:support-v4:13.0.0'
compile 'com.google.android.gms:play-services:3.1.36'
}
android {
compileSdkVersion 18
buildToolsVersion '18.0.0'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
Upvotes: 4
Reputation: 40734
In order to use that artifact, you need to install the "Google Repository" in the extras of the SDK manager, not "Google Play Services" as it sounds like you've done.
Upvotes: 23