2014-10-05 30 views
0

我正在嘗試將Google遊戲功能添加到正在開發的視頻遊戲中。我在IntelliJ Idea上使用LibGDX。我使用的LibGDX版本(1.2.0)使用基於gradle的項目。無法將GooglePlayServices添加到IntelliJIdea上的libGDX項目中,並且已經安裝了Google Repository並且安裝了正確的Android SDK路徑

我已將此添加到項目(「:機器人」)的依賴關係部分塊上的主要的build.gradle文件:

compile 'com.google.android.gms:play-services:5.2.8' 

然而,IntelliJ IDEA的給了我這個錯誤時建築:

Error:Gradle: A problem occurred configuring project ':android'. 
> Could not resolve all dependencies for configuration ':android:_debugCompile'. 
    > Could not find com.google.android.gms:play-services:5.2.8. 
    Required by: 
     cg.euler:android:1.0 

此外, 「編譯」 行給了我這樣的警告:

Dependency on Play Services, but the SDK installation does not have the "Extras > Google Repository" installed. Open the SDK manager and install it. 

這是我一直CH ecked /測試:

  • 對項目的Android SDK路徑的配置是正確的(我只在我的電腦上一個SDK)
  • 的谷歌存儲庫軟件包安裝在SDK管理器
  • 的谷歌播放服務包安裝在SDK管理器
  • 我試圖重新安裝兩個谷歌Reposotory和谷歌播放的SDK經理

回答

1

你玩的服務依賴的版本是不正確的庫,它壽ld是

compile 'com.google.android.gms:play-services:5.2.08' 
+0

哈哈哈.....哇...什麼是noob錯誤:P。謝謝你正是這樣,謝謝。 – CapitanNerd 2014-10-05 17:05:30

相關問題