2015-09-25 39 views
0

我只需要一個OAuth 2.0令牌來授權Google for REST API的請求。所以我需要導入谷歌播放服務SDK。 特別是:如何添加一個特定的Google Play服務api到Eclipse android項目

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

我使用eclipse我只想要導入的谷歌帳戶登錄API,但對如何做到這一點沒有說明。

如果沒有解決,我怎麼能搶在依賴Android的工作室中引用的Jar項目https://developers.google.com/android/guides/setup

+0

檢查此鏈接https://developers.google.com/identity/sign-in/android/start-integrating – Nithinlal

+0

我只需要一個OAuth 2.0令牌來驗證對谷歌API的請求,而不是谷歌加號登錄 –

+0

時間切換到android工作室也許? – k0sh

回答

1

有一個解決方案,我猜。試試這個:

  1. 轉到 「android_sdk \演員\谷歌\ m2repository \ COM \谷歌\機器人\ GMS \播放服務身份\ 8.1.0 \」
  2. 複製「播放服務,identity- 8.1.0.aar「到你的eclipse項目的/ libs目錄。
  3. 打開「project.properties」文件並添加以下行:android.libraries.reference.1 = libs/play-services-identity-8.1.0 /和Run Application。

如果它不起作用,請嘗試使用com.google.android.gms設置您的項目:android studio中的play-services-identity:8.1.0和/ for eclipse中的導入/導出gradle項目。它很可能會自動解決包含的依賴關係,以使用eclipse。

希望它有幫助。

+1

謝謝你的美麗答案。但是工作解決方案比這個更詳細。查看該主題中的評論http://bit.ly/1LKunQF 您可以更新您的答案和剩餘的詳細信息,否則我將在稍後創建答案。再次感謝。 –

相關問題