Adding firebase to libgdx project built with gradle

て烟熏妆下的殇ゞ 提交于 2019-12-07 02:02:34

I have never used Firebase but I just ran a quick gradle build and this worked

You need to add the dependency to the project that you are going to use it in. Add the dependency to the core project like this;

project(":core") {
apply plugin: "java"

dependencies {
    compile "com.badlogicgames.gdx:gdx:$gdxVersion"
    compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
    // add firebase
    compile 'com.firebase:firebase-client:1.0.16'
}

I just ran a build and changed the firebase version number to "1.0.16" as shown here Firebase Quickstart and removed the "+" and it worked fine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!