Reputation: 175
I am getting this error only when build release appbundle or apk. It works fine in runtime build.
flutter run --release --flavor prod --verbose
Unhandled Exception: [core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()- call Firebase.initializeApp()
MethodChannelFirebase.app (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:195)
i had this issue few days ago and i put this line in bottom of app/build.gradle file and it worked:
apply plugin: 'com.google.gms.google-services'
But suddenly today i am facing this issue again. I tried asking all the major LLMs and searching all over internet. Still couldn't solve it yet. Please help.
Upvotes: 1
Views: 41
Reputation: 56
Firebase.initializeApp();
call this in your main function before "runApp"
Upvotes: 1