From the Android Studio click over the gear icon ( ) and then select the option: "Compact Empty Middle Packages", to see the folders separated in a tree view.
Now select the folder, click right button to open the contextual menu, select Refactor and then Rename
You will be advised to refactor the package:
Then a window will show the coincidences inside the proyect, select "Do Refactor"
We don´t have to change manually the AndroidManifest.xml or build.gradle files, Refactoring the package will do the job!.
Open Android Studio (Here I am using Android Studio 3.0). And you need to create a project with an Empty Activity. I created a project named GoogleLoginExample.
Once your project is loaded then click on Tools->firebase
Google Login Android
Then you will see a new window on the right. Here you need to select Authentication.
Google Login Android using Firebase
Now you need to connect to firebase. It will again open a window, and from this window, you can create a new Firebase Project, or if you want you can also choose an existing one.
Connecting to Firebase
After connecting to Firebase, click on Add Authentication and accept the changes. It will add all the required dependencies.
Enabling Google Login in Firebase Console
If we want to use Google Login with Firebase, then we also need to enable it in the Firebase Console (Default disables it).
To enable it, go to Firebase Console (console.firebase.google.com). Then from the right, select Authentication, then select SIGN-IN METHOD, and here you need to allow Google Option. (See the image below it is disabled, and you need to enable it).