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

5 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

Powered by Blogger.