【发布时间】:2014-10-05 15:48:24
【问题描述】:
我正在尝试将 Google 游戏功能添加到我正在开发的视频游戏中。我在 IntelliJ Idea 上使用 LibGDX。我正在使用的 LibGDX 版本(1.2.0)使用基于 gradle 的项目。
我已将此添加到主 build.gradle 文件的 project(":android") 块的依赖项部分:
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.
这是我检查/测试过的:
- 项目上Android SDK路径配置正确(我的电脑只有一个SDK)
- Google Repository 软件包已安装在 SDK 管理器上
- Google Play 服务包已安装在 SDK 管理器上
- 我尝试在 SDK 管理器上重新安装 Google Repository 和 Google Play 库
【问题讨论】:
标签: android intellij-idea gradle libgdx google-play-services