How To Add Firebase To Android Project Within 5 Minutes 2021 (Complete Guide) | Step By Step Tutorial
Step 1: Go to Firebase Console after sign in to your google account and click on add project
.
Step 2: Enter your android project name and click continue.
Again click continue.
Now, click on the create project
and the last click on continue.
Our firebase project is ready now and now we have to link it with our android project. So let's follow this remaining step for linking the android project to the firebase project.
Step 3: Click on the android icon (2nd one).
Step 4: Enter the application id (package name) in the Android package name.
You can find your application id (package name) in Gradle Scripts->build.gradle(Module: app) file.
now click on the Register app.
Next, click on download google-services.json and save it in your system.
Now go to android studio and save it in project->app level as shown below:
Now click Next.
Step 5:
Now add firebase SDK into the android project.
Go to Gradle Scripts->builde.gradle(Project: appname) and add this in dependencies
classpath 'com.google.gms:google-services:4.3.2'
and now add this plugin and dependency on the app-level build.gradle file as shown below:
apply plugin: 'com.google.gms.google-services'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
and click sync now and go to firebase and click Next.
Now run the app in your android device or click on skip this step.
Congrats you successfully add firebase to your android app :)
If you face any problem or have any suggestion please comment it down we love to answer it.
.
Step 2: Enter your android project name and click continue.
Again click continue.
Now, click on the create project
and the last click on continue.
Our firebase project is ready now and now we have to link it with our android project. So let's follow this remaining step for linking the android project to the firebase project.
Step 3: Click on the android icon (2nd one).
You can find your application id (package name) in Gradle Scripts->build.gradle(Module: app) file.
now click on the Register app.
Next, click on download google-services.json and save it in your system.
Now go to android studio and save it in project->app level as shown below:
Now click Next.
Step 5:
Now add firebase SDK into the android project.
Go to Gradle Scripts->builde.gradle(Project: appname) and add this in dependencies
classpath 'com.google.gms:google-services:4.3.2'
and now add this plugin and dependency on the app-level build.gradle file as shown below:
apply plugin: 'com.google.gms.google-services'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
and click sync now and go to firebase and click Next.
Now run the app in your android device or click on skip this step.
Congrats you successfully add firebase to your android app :)
If you face any problem or have any suggestion please comment it down we love to answer it.
Comment down what next topic you need a guide on? or Drop a message on our social media handle.
Happy coding and designing : )
Comments
Post a Comment