Describe the bug
Getting the exception not able to run tha application
Unhandled Exception: MissingPluginException(No implementation found for method Firebase#initializeCore on channel
plugins.flutter.io/firebase_core
Steps to reproduce
Steps to reproduce the behavior:
Go to '...'
'...'
See error or incorrect behavior
Expected behavior
A clear and concise description of what you expected to happen.
Sample project
Providing a minimal example project which demonstrates the bug in isolation from your main App greatly enhances the chance of a timely fix.
Please link to the public repository URL.
void main() async {
WidgetsFlutterBinding.ensureInitialized();
Constants.setEnvironment(Environment.STAGING);
await PreferenceUtils.getInstance();
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(); //getting the issue for this line of code
await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
runApp(MyApp());
\mobile_app_doctors>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.0.3, on Microsoft Windows [Version 10.0.19044.1766], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.48.2)
[√] Connected device (4 available)
[√] HTTP Host Availability
Bug report
Restarted application in 2,540ms. E/flutter (21575): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core) E/flutter (21575): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:165:7) E/flutter (21575):
E/flutter (21575): #1 MethodChannel.invokeListMethod (package:flutter/src/services/platform_channel.dart:353:35)
E/flutter (21575):
E/flutter (21575): #2 MethodChannelFirebase._initializeCore (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:31:23)
E/flutter (21575):
E/flutter (21575): #3 MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:73:7)
E/flutter (21575):
E/flutter (21575): #4 Firebase.initializeApp (package:firebase_core/src/firebase.dart:40:31)
E/flutter (21575):
E/flutter (21575): #5 main (package:medeva/main.dart:45:3)
E/flutter (21575):
Describe the bug Getting the exception not able to run tha application Unhandled Exception: MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Sample project
Providing a minimal example project which demonstrates the bug in isolation from your main App greatly enhances the chance of a timely fix. Please link to the public repository URL.
void main() async { WidgetsFlutterBinding.ensureInitialized(); Constants.setEnvironment(Environment.STAGING); await PreferenceUtils.getInstance(); WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); //getting the issue for this line of code await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true); runApp(MyApp());
await SentryFlutter.init( (options) => options ..dsn="https://" //beta //..dsn="https://" //production ..enableAutoSessionTracking=true ..environment = 'staging', //..environment = 'prod',
); }
Flutter doctor
Run
flutter doctor
and paste the output below:\mobile_app_doctors>flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.0.3, on Microsoft Windows [Version 10.0.19044.1766], locale en-IN) [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [√] Chrome - develop for the web [X] Visual Studio - develop for Windows X Visual Studio not installed; this is necessary for Windows development. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components [√] Android Studio (version 2020.3) [√] VS Code (version 1.48.2) [√] Connected device (4 available) [√] HTTP Host Availability
! Doctor found issues in 1 category.