Including Google Play Services to Android Studio project
android, android-studio, java
Solution
Using Android Studio, the only thing you need is to edit the build.gradle file and make sure that there are no android or google jar libraries, which means that you will need to remove jar libraries from your project (unless you're using libs like ActionbarSherlock which may need jar libs).
If you plan using Google Play Services, your build.gradle file should look like this :
dependencies {
compile 'com.android.support:support-v4:13.0.+'
compile 'com.android.support:support-v13:13.0.+'
compile 'com.google.android.gms:play-services:3.1.36'
}
Pretty straightforward indeed.
Also, if you're using `Facebook SDK`, you will need to edit its `build.gradle` file and change its dependencies in accordance to your main project's `build.gradle`.
Problem
I've been trying to include the latest Google Play Services library to my Android Studio project in order to use push messages and Maps API. Since there are plenty of tutorials on how to include this library on Eclipse and CLI , there are no instructions on how to include the latest library on Android Studio. I've been searching on many sites and one of the answers which looked to be the most fitting looked to be this one, since other ones appear to document an older version, but it still appears like I'm missing something. I've tried to include this lib the same way I included the Facebook library to my project (which is oddly better documented for Android Studio than GooglePlay is) but it still looks like i'm missing something. To do so, I've copied the whole folder `<android-sdk>\extras\google\google_play_services\libproject\google-play-services_lib` to my `<project-path>\libraries\google-play-services_lib` Then in Studio, i tried to add the copied folder in Module > add > Import module, like said in the Facebook documentation or in the link provided. I must be forgetting something like a gradle file, checking a module property, i don't really know anymore what i'm doing with this lib. EDIT: I AM alreay working on Android Studio.