我想将 Chartboost 添加到我的 LibGDX 游戏中,但我不知道如何将其添加为 Gradle 的依赖项。另外,Chartboost 使用 Google Play 游戏服务,因此我需要将它们都添加到 Gradle 中。我怎样才能做到这一点?
最佳答案
chartboost jar 似乎没有发布到公共(public) Maven 存储库,因此您需要通过文件引用它:
dependency {
// references a file relative to the project folder
files('libs/chartboost.jar')
}
要添加 Google Play 服务,您可以像这样引用它:
dependencies {
// Google Play Services
compile 'com.google.android.gms:play-services:5.0.77'
// Note: these libraries require the "Google Repository" and "Android Repository"
// to be installed via the SDK manager.
}
关于java - 如何将 Chartboost 依赖项添加到我的 LibGDX 项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25939577/