new firebase with awesome features was just announced, but according to documentation (https://firebase.google.com/docs/android/setup#prerequisites) android studio (as well as gradle) is required now. For now in my cocos2d-x apps I have to use ADT/Eclipse to build apps, because gradle isn't supported yet (however cocos2d-x team is working on it). I'm now using an older version of the sdk, which is just a jar file. Is there a way to use new firebase in eclipse? What worries me the most is that plugin:
apply plugin: 'com.google.gms.google-services'
Gradle builds that use Android Gradle plugin (AGP) v4.2 or earlier need to enable Java 8 support. Otherwise, these Android projects get a build failure when adding a Firebase SDK. Add the listed compileOptions from the error message to your app-level build.gradle file. Increase the minSdkVersion for your Android project to 26 or above.
There are two ways to add firebase to any Android app: Using Firebase Assistant. Below are the steps to include Firebase to Android project in Android studio: Create a new project in the firebase by clicking on the Add project. Now open the android studio and click on Tools in the upper left corner.
Now download the google-services.json file and place it in the root directory of the android app. Now add the following in the project. Adding the sdk in the project. ... Now Sync the gradle by clicking on sync now. After adding the above code (sdk), run the app to send the verification to the Firebase console.
In the Firebase console, click Add project, then select or enter a Project name. If you have an existing Google Cloud project, you can select the project from the dropdown menu to add Firebase resources to that project.
Take a look at this Github repository, I was using it as example to use Firebase with Eclipse (but finally I moved my project to Android Studio with Gradle because it was really awful).
README Project: https://github.com/dandar3/android-google-firebase-README
Actual Project: https://github.com/dandar3/android-google-firebase-common
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With