Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import Google API in Android Studio

I'm trying out Android Studio. I want to use Drive API in my project. In eclipse, there is a Google Plugin for Eclipse, but how about Android Studio? Does anyone tried it so far?

like image 638
bianca Avatar asked May 28 '13 00:05

bianca


People also ask

How do I add a Google API key to my Android?

Go to the Google Maps Platform > Credentials page. On the Credentials page, click Create credentials > API key. The API key created dialog displays your newly created API key. Click Close.


Video Answer


1 Answers

Bellow you can find last versions for Google Drive (2014.12.28):

//Google Drive API
compile 'com.google.android.gms:play-services:6.5.+'
compile 'com.google.api-client:google-api-client-xml:1.18.0-rc'         
compile 'com.google.http-client:google-http-client-gson:1.18.0-rc'
compile 'com.google.api-client:google-api-client-android:1.18.0-rc'
compile 'com.google.apis:google-api-services-drive:v2-rev155-1.19.0'

To check last version try following links:

https://developer.android.com/google/play-services/setup.html

https://code.google.com/p/google-api-java-client

https://developers.google.com/api-client-library/java/apis/drive/v2

http://mvnrepository.com/artifact/com.google.apis/google-api-services-drive

like image 70
Michal Avatar answered Sep 25 '22 13:09

Michal