For a beginner in previous days connecting android studio projects with firebase or google services was a big pain but not now with the new android studio you can connect your project directly to firebase in the android studio itself. With a nice user interface and simple steps, you can connect your project or app to the firebase within a minute. So today I will demonstrate How to add Firebase to your android project with services like firebase authentication, firebase analytics, etc. So let’s get started
1. Create/open you android studio project in which you want to connect firebase
2. open tools=>firebase as shown in image below

3. Firebase panel with list of available services will appear from right side of Android studio as shown in image below

4. Now select which service you want. For example, i want to add firebase authentication to my project so select authentication from list as shown in image below

5.Now here you will be presented with the following screen. Select connect to firebase option

6. popup dialog will appear with list of previously created projects as shown in image below. Select you want to create a new project or connect to the existing project and click on connect to firebase.

7. Now it will start connecting to firebase and will download google-service.json file for us automatically as shown I image below.

8. After a successful connection with firebase, a small popup will be shown at bottom of screen as shown in image below

10. Now we are connected to firebase but we did not add firebase authentication to our project so to do that select second option add firebase authentication to your app as shown in the image below.

11. Now android studio will show a popup stating changes going to happen in gradle files click on accept changes this will start synchronizing project with gradle files.

12. After gradle build finished you will see Firebase panel will show status as connected and Dependencies setup correctly as shown in image below

Now you are ready to user firebase authentication inside your project. To add other services follow the same procedure. If you are running into any problem use comment boxes below I will be happy to help you. Thank You! 🙂