Add Connect Firebase Project to Android Studio Step by Step Guide

How to properly configure setup Firebase online project to Android Studio and install firebase libraries in application.

Firebase is one of the most popular products from Google to create and manage web applications like websites and mobile applications(Android, iPhone). Firebase is very easy to use and comes with no server side coding skills because there is no need to do server side programming . It is much easier then MySQL because when we are using MySQL then we need to server side work in PHP language to convert that data into JSon form. So here is the complete step by step tutorial for Add Connect Firebase Project to Android Studio Step by Step Guide .

How to Add Connect Firebase Project to Android Studio Step by Step Guide .

1. Open firebase.google.com .

2. Click on Get Started button present on home screen.

Connect Firebase Project

3. Now log in with your Google Gmail ID.

4. Click on Add Project.

5. Enter your project name and select your country then click on CREATE PROJECT .

6. Click on Add firebase to your android app icon.

7. Create a fresh project in Android Studio.

8. Now Add application Package Name, App Nick Name, SHA-1 certificate. To get the SHA-1 certificate from Android Studio read my this tutorial, it is the easiest method to get SHA-1 certificate.

9. Now hit the Register App button.

10. Here you go now your google-services.json file has been successfully generated. Hit the Download google-services.json button to download this file physically into your computer.

11. Next step is to add google-services.json inside your project. So open your project and put( Copy ) google-services.json file inside YourProjectName/app folder. For example my firebase project name is Firebase-AndroidJSon.com then my app folder located is Firebase-AndroidJSon.com/app . Now copy the google-services.json file into app folder like i did in below screenshot.

12. Now open your Project’s build.gradle(Project) file.

13. Add classpath ‘com.google.gms:google-services:3.0.0’ inside dependencies block.

14. Open your project’s build.gradle(Module:app) file.

15. Add compile ‘com.firebase:firebase-client-android:2.4.0’ inside dependencies block .

16. Then add apply plugin: ‘com.google.gms.google-services’ at the bottom of the page.

17. Now finally add below packagingOptions just bottom of buildTypes block like i did.

packagingOptions{
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE-FIREBASE.txt'
    exclude 'META-INF/NOTICE'

}

Final Screenshot :

Leave a Reply

Your email address will not be published. Required fields are marked *