How to add Firebase to your Android Studio Project

Prerequisites

You need a device running Android 2.3 (Gingerbread) or newer devices.
NewImage
Make sure the device or emulator has a Google Play Services 9.0 or above.

NewImage

You need to make sure you have atl least Google Play Services rev 30 and Google Repository Rev 30. As per today we have Google Play services rev 33 and Google Repository rev 35. Always update this two repository.

There are plenty of sample code for Andorid and iOS here. You can also Quick Start from GitHub

Step to add firebase project.
 NewImage
1. Add firebase project in https://firebase.google.com/console/.


NewImage
2. Click Add Firebase to your Android app
NewImage
3.When prompted, enter your app's package name. It's important to enter the package name your app is using; this can only be set when you add an app to your Firebase project.

4. Doownload a google-services.json file and drag and drop the file in your android studio app folder.


NewImage

The Google services plugin for Gradle loads the google-services.json file that you just downloaded. Modify your build.gradle files to use the plugin.

  1. Project-level build.gradle (<project>/build.gradle):
    buildscript { dependencies {
        // Add this line
        classpath 'com.google.gms:google-services:3.0.0' } }
  2. App-level build.gradle (<project>/<app-module>/build.gradle):
    ...
    // Add to the bottom of the file
    apply plugin: 'com.google.gms.google-services'
    includes Firebase Analytics by default help_outline
  3. Finally, press "Sync now" in the bar that appears in the IDE:
The Google services plugin for Gradle loads the google-services.json file that you just downloaded. Modify your build.gradle files to use the plugin.

How to add Firebase to your Android Studio Project How to add Firebase to your Android Studio Project Reviewed by Admin on 10:51 PM Rating: 5

9 comments:





  1. Wonderful information! I found amazing information on the blogs i suggest everyone to follow the links below to get download files from this website.



    https://apkfasak.com/fmwhatsapp-apk/
    https://apkfasak.com/gb-whatsapp-apk/

    ReplyDelete
  2. Thanks for the detailed information about Android studio Project. I would love to see more such awesome blog posts from you. Keep up the Good Work! Thats why I love Gbwhatsapp for android, It has a lot of awesome features.

    ReplyDelete
  3. Essentially, for a short, widely inclusive answer: all these Android applications focus on cash and on the off chance that they are utilized, they will assist you with sparing some money! bluestacks 3 download for pc

    ReplyDelete
  4. Hey, thank you a lot for sharing this article with us. I can’t say, how grateful we are to read this. Also, I would love to share it with my friends and family, who are interested. I hope you will publish such articles in the future as well. It’s so helpful. Goodbye! Take a look at this wonderful article and download clash of clans MOD APK 2021 for free And visit ModsDroid.

    ReplyDelete
  5. In general, we can see that most of the people are struggling to find the stuffs when you want to know. If you are looking for the same, then without going for a second thought, go ahead with this- Check new posts- fmwhatsapp and gbwhatsapp

    ReplyDelete
  6. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. Keep up the good work - COC MOD and GBWhatsapp

    ReplyDelete

Powered by Blogger.