3

I update my project from flutter to Flutter 2.0 null-safety. I solved every problem beetween dependencies, but when I run the app console show me this error. I find lot of similar question, but their answer don't work in my project.

  • I try with flutter clean,

  • flutter pub get,

  • delete cache,

  • to uninstall the app from the device,

  • to add this

    WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp();

in the main but actually anything works. Someone has other advice? Or other things to try?

E/flutter (11903): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core)
E/flutter (11903): #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:7)
E/flutter (11903): <asynchronous suspension>
E/flutter (11903): #1      MethodChannel.invokeListMethod (package:flutter/src/services/platform_channel.dart:344:35)
E/flutter (11903): <asynchronous suspension>
E/flutter (11903): #2      MethodChannelFirebase._initializeCore (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:30:23)
E/flutter (11903): <asynchronous suspension>
E/flutter (11903): #3      MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:77:7)
E/flutter (11903): <asynchronous suspension>
E/flutter (11903): #4      Firebase.initializeApp (package:firebase_core/src/firebase.dart:41:31)
E/flutter (11903): <asynchronous suspension>
E/flutter (11903): #5      mainCommon (package:tauatu/tauatu.dart:35:3)
E/flutter (11903): <asynchronous suspension>
E/flutter (11903): ```
nvrm22
  • 61
  • 4
  • can you share the main function here , along with pubspec.yaml – Aman Verma Apr 26 '21 at 13:51
  • I am facing the same issue that you describe. I too have tried all the solutions on the internet as you mentioned above. In addition, I made multiDexEnabled true, tried replacing kotlin with Java, but still no luck. My app opens with a black screen and it gets stuck there - nothing happens beyond. The beauty is this same code was working fine after I upgraded from Flutter 1.22 to 2.2.3. But then I tried to integrate a native sdk and then this whole thing fell apart. If you have found any solution, please let me know. Thanks! – WeSay Solutions Jul 28 '21 at 18:36
  • MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core) – WeSay Solutions Jul 28 '21 at 18:37

0 Answers0