How to fix FirebaseApp with name [DEFAULT] doesn't exist issue with flutter

Image result for flutter images



How to fix FirebaseApp with name [DEFAULT] doesn't exist issue with flutter

This is a very common issue when we try to google authenticate our app with flutter.

Please check the following are done in your app.

  1. Updated the android build.gradle file
  2. Updated the android\app build.gradle file
  3. Added dependency to pubspec.yaml
  4. Placed the google-services.json file

Check Updated the android build.gradle file

  • Add the following line to the android/build.gradle file



  • please add the following line to that file.

classpath 'com.google.gms:google-services:4.3.2'  // Google Services plugin



Check Updated the android\app build.gradle file
  • Add following line to the following location

  • apply plugin: 'com.google.gms.google-services'

Check Added dependency to pubspec.yaml

firebase_auth: ^0.14.0+5
google_sign_in: ^4.0.7

Placed the google-services.json file

  • make sure you have added google-services.json from the firebase console too.
  • Then click Sync the Gradle changes which will automatically ask from the IDE.
  • Most important point is run flutter clean before run your app. Most guys missed this and got this problem.
  • Finally, run the app

Comments

Post a Comment

Comment

Popular posts from this blog

IOT Greenhouse project part 1

Let's Learn NodeMCU(EPS8266MOD) very popular IoT component