【问题标题】:Google Game Play Services + Gradle + Eclipse谷歌游戏服务 + Gradle + Eclipse
【发布时间】:2014-09-12 17:49:38
【问题描述】:

我需要了解如何设置 libGDX 项目的 gradle 配置,我正在使用 Eclipse。如何设置 gradle 文件(如 build.gradle 和 settings.gradle)以使设置适用于 IOS 和 Android libGDX 项目。

感谢大家的帮助,

安东尼

【问题讨论】:

    标签: eclipse libgdx google-play-services


    【解决方案1】:

    要将 google play 服务添加到 android 打开 build.gradle(从项目文件夹)

    project(":android") {
    apply plugin: "android"
    
    configurations { natives }
    
    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
        compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
        // ^ default things
        compile 'com.google.android.gms:play-services:5.0.89' // this one, add this line
    
    }
    

    }

    您可能需要为 iOS 做同样的事情。 (没有测试,我没有Mac)。 让我知道它是否有效。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-10-23
    • 2015-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多