2

I have tried download the latest version on the sdk manager, but is still not working. I have seen other posts telling users to enter the following...

compile 'com.google.android.gms:play-services:4.2.+'

I do not understand where to enter it. I tried in the terminal feature of the android studio but it gives me a bash "command not found" error.

if it matters I am trying to implement the example maps that android studio gives you when you begin a new project.

Community
  • 1
  • 1

1 Answers1

0

If you are using Android Studio open the build.gradle file and enter inside dependencies

dependencies {
    compile 'com.google.android.gms:play-services:4.2.+'
}

more info Add Google Play Services to Your Project

Jorgesys
  • 124,308
  • 23
  • 334
  • 268
  • Please do not suggest this. You need to use the "modules". This dependency alone is gigantic. Also, the current version is `7.5.0`. – Jared Burrows Jun 23 '15 at 02:02
  • write to google to stop doing this https://developers.google.com/android/guides/setup , and btw why do you suggest this ?http://stackoverflow.com/questions/30124661/sync-gradle-always-stops-with-error/30127666#30127666 – Jorgesys Jun 23 '15 at 02:59
  • To stop doing what? They are using `7.5.0` in that link you just posted. Suggest what? That user was bringing in duplicate jars. It is best to use gradle dependencies vs jars as well. – Jared Burrows Jun 23 '15 at 03:28
  • Note: as of [Google Play services 6.5](http://android-developers.blogspot.com/2014/11/google-play-services-65.html), you should *always* use [selective APIs](https://developers.google.com/android/guides/setup#split) to only include the parts of Google Play services you need. – ianhanniballake Jun 23 '15 at 03:32