3.7 Additional Firebase Setup for Android

Now, you have to connect the firebase with your code project. Follow the steps below:

  • Run the following command from your IDE terminal:

firebase login

After this command, you will get a link prompt to log in with the email account that you have used on firebase. Login with that by allowing the required criteria.

  • Run the following command from your IDE terminal:

dart pub global activate flutterfire_cli

After this command, if you get an error like the picture below, then just copy that line and run that.

  • Run the following command from your IDE terminal:

flutterfire configure
  • Select Your App and Press Enter.

  • Select Android and press Enter.

Use arrow keys & space to select/unselect

You can select both Android & iOS if you want to build for both. If you do that, you can ignore the 4.5 Step.

After this command, A google-services.json file in the android/app folder and A firebase_options.dart file in the lib folder will be added. If you found them, your firebase configuration is successful.

Last updated