Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Google-play-services library

I need the google-play-services library and I am using Android Studio.

  • I installed the google-play-service library with the SDK manager
  • Added the dependencies to my build.gradle

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 ?

like image 672
nsvir Avatar asked Aug 22 '13 13:08

nsvir


2 Answers

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.

like image 155
Sam Dozor Avatar answered Sep 22 '22 06:09

Sam Dozor


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']
                }
            }

}

like image 33
Raghuram Avatar answered Sep 23 '22 06:09

Raghuram