How to fix FirebaseApp with name [DEFAULT] doesn't exist issue with flutter
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.
- Updated the android build.gradle file
- Updated the android\app build.gradle file
- Added dependency to pubspec.yaml
- 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
- 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
Thank you
ReplyDelete