【问题标题】:How to add a specific Google play Services api to Eclipse android project如何将特定的 Google Play Services api 添加到 Eclipse android 项目
【发布时间】:2015-09-25 18:05:22
【问题描述】:

我只需要一个 OAuth 2.0 令牌来授权 Google 对 REST API 的请求。所以我需要导入 google play service sdk。 特别是:

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

我用的是eclipse我只想导入谷歌账号登录api,但是没有说明怎么做。

如果没有解决方案,如何获取android studio项目https://developers.google.com/android/guides/setup的依赖项中引用的Jar

【问题讨论】:

标签: android eclipse google-play-services google-oauth


【解决方案1】:

我猜有一个解决方案。试试这个:

  1. 转到“android_sdk\extras\google\m2repository\com\google\android\gms\play-services-identity\8.1.0\”
  2. 将“play-services-identity-8.1.0.aar”复制到 Eclipse 项目的 /libs 目录中。
  3. 打开“project.properties”文件并添加以下行:android.libraries.reference.1=libs/play-services-identity-8.1.0/ 并运行应用程序。

如果它不起作用,请尝试在 android studio 中使用 com.google.android.gms:play-services-identity:8.1.0 设置您的项目,然后在 eclipse 中导入/导出 gradle 项目。它很可能会自动解析包含的依赖项以与 eclipse 一起使用。

希望对你有帮助。

【讨论】:

  • 感谢您的精彩回答。但是工作解决方案比这更详细。查看此线程中的 cmets bit.ly/1LKunQF 您可以使用此处的剩余详细信息更新您的答案,或者稍后我将创建一个答案。再次感谢。
猜你喜欢
  • 1970-01-01
  • 2018-06-27
  • 1970-01-01
  • 1970-01-01
  • 2017-08-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-04-18
相关资源
最近更新 更多