【发布时间】:2023-03-19 20:09:01
【问题描述】:
我想将 Chartboost 添加到我的 LibGDX 游戏中,但我不知道如何将它作为依赖项添加到 Gradle。另外,Chartboost 使用 Google Play 游戏服务,所以我需要将它们都添加到 Gradle。我该怎么做?
【问题讨论】:
标签: java gradle libgdx chartboost
我想将 Chartboost 添加到我的 LibGDX 游戏中,但我不知道如何将它作为依赖项添加到 Gradle。另外,Chartboost 使用 Google Play 游戏服务,所以我需要将它们都添加到 Gradle。我该怎么做?
【问题讨论】:
标签: java gradle libgdx chartboost
chartboost jar 似乎没有发布到公共 maven 存储库,因此您需要通过文件引用它:
dependency {
// references a file relative to the project folder
files('libs/chartboost.jar')
}
要添加谷歌播放服务,您可以像这样引用它:
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.
}
【讨论】: