kc ochibili
kc ochibili

Reputation: 3131

How to add a specific Google play Services api to Eclipse android project

i simply need an OAuth 2.0 token to authorize requests with Google for REST APIs. so I need to import the google play service sdk. specifically the:

Google Account Login    com.google.android.gms:play-services-identity:8.1.0

I am using eclipse I only want to import the Google account login api, but there is no instructions on how to do so.

if there is no solution, how can I grab the Jar referenced in the dependencies for android studio projects https://developers.google.com/android/guides/setup

Upvotes: 0

Views: 2402

Answers (1)

prashantwosti
prashantwosti

Reputation: 1010

There is a solution I guess. Try this:

  1. Go to "android_sdk\extras\google\m2repository\com\google\android\gms\play-services-identity\8.1.0\"
  2. Copy "play-services-identity-8.1.0.aar" to your eclipse project's /libs directory.
  3. Open "project.properties" file and add this line: android.libraries.reference.1=libs/play-services-identity-8.1.0/ and Run Application.

And if it didn't work, try setting up your project with com.google.android.gms:play-services-identity:8.1.0 in android studio and import/export gradle project in/for eclipse. It will most probably resolves the included dependencies automatically to work with eclipse.

Hope it helps.

Upvotes: 1

Related Questions