java - Including Google Play Services to Android Studio project -


i've been trying include latest google play services library android studio project in order use push messages , maps api.

since there plenty of tutorials on how include library on eclipse , cli , there no instructions on how include latest library on android studio.

i've been searching on many sites , 1 of answers looked fitting looked this one, since other ones appear document older version, still appears i'm missing something.

i've tried include lib same way included facebook library project (which oddly better documented android studio googleplay is) still looks i'm missing something.

to so, i've copied whole folder <android-sdk>\extras\google\google_play_services\libproject\google-play-services_lib <project-path>\libraries\google-play-services_lib

then in studio, tried add copied folder in module > add > import module, said in facebook documentation or in link provided. must forgetting gradle file, checking module property, don't know anymore i'm doing lib.

edit: alreay working on android studio.

using android studio, thing need edit build.gradle file , make sure there no android or google jar libraries, means need remove jar libraries project (unless you're using libs actionbarsherlock may need jar libs).

if plan using google play services, build.gradle file should :

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, need edit build.gradle file , change dependencies in accordance main project's build.gradle.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -