ERROR flutter lib ui ui dart state cc 157 Unhandled Exception core no-app No Firebase App DEFAULT has been created - call Firebase initializeApp

0 votes

Hi Guys,

I am trying to connect to the firebase in GCP from my Flutter App. But it is showing me the below error.

E/flutter ( 7544): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: [core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()
Sep 3, 2020 in Others by akhtar
• 38,170 points
3,038 views

2 answers to this question.

0 votes

Hi@akhtar,

After installing the package in your Flutter app, you need to initialize Firebase in your main function. You are probably invoking firebase before the app is initialized. All calls to firebase must come after .initializeApp(). So in your main function initialize first as shown below.

firebase.initializeApp();
var db = firebase.firestore();
answered Sep 3, 2020 by MD
• 95,060 points
0 votes
answered Nov 21, 2020 by Milan
• 140 points

Related Questions In Others

0 votes
1 answer

flutter run: No connected devices

Hi@akhtar, To prepare to run and test your ...READ MORE

answered Jul 21, 2020 in Others by MD
• 95,060 points
990 views
0 votes
1 answer

How to create a Volume Icon in Flutter App?

Hi@akhtar, You can use Icon Widget to create ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,060 points
281 views
0 votes
1 answer

How to add one image in Flutter App?

Hi@akhtar, You can use Image.network() method to add ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,060 points
78 views
0 votes
1 answer

How to remove debug banner from Flutter App?

Hi@akhtar, On your MaterialApp set debugShowCheckedModeBanner to false. The debug banner will also automatically be ...READ MORE

answered Jul 28, 2020 in Others by MD
• 95,060 points
696 views
0 votes
1 answer

What is the future of flutter?

Hi@MD, Flutter is a rather new cross-platform framework ...READ MORE

answered Jul 17, 2020 in Others by akhtar
• 38,170 points
134 views
0 votes
1 answer

What is Flutter?

Hi@akhtar, Flutter is an app SDK for building ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,060 points
213 views
0 votes
1 answer

How to install Flutter in Windows system?

Hi@akhtar, You can follow the below-given steps to ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,060 points
343 views
0 votes
1 answer

Error: No pubspec.yaml file found.

Hi@akhtar, You need to run this command from ...READ MORE

answered Jul 20, 2020 in Others by MD
• 95,060 points
2,404 views