7

When I run my application in debug mode, it connects to firebase and works. there is no problem. But when I run it in release mode, I get the following error and the application does not open at all.

MissingPluginException (No implementation found for method Firebase # initializeCore on channel plugins.flutter.io/firebase_core)

Although I tried many methods on the internet, I could not solve the problem. I will be grateful if you could help me ...

Launching lib/main.dart on sdk gphone x86 64 in release mode...
Plugin `cloud_firestore` doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.
                                                                        
To set a default implementation, use:                                   
flutter:                                                                
  plugin:                                                               
    platforms:                                                          
      macos:                                                            
        default_package: <plugin-implementation>                        
                                                                        
To implement an interface, use:                                         
flutter:                                                                
  plugin:                                                               
    implements: <plugin-interface>                                      
                                                                        
Plugin `firebase_auth` doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.
                                                                        
To set a default implementation, use:                                   
flutter:                                                                
  plugin:                                                               
    platforms:                                                          
      macos:                                                            
        default_package: <plugin-implementation>                        
                                                                        
To implement an interface, use:                                         
flutter:                                                                
  plugin:                                                               
    implements: <plugin-interface>                                      
                                                                        
Plugin `firebase_core` doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.
                                                                        
To set a default implementation, use:                                   
flutter:                                                                
  plugin:                                                               
    platforms:                                                          
      macos:                                                            
        default_package: <plugin-implementation>                        
                                                                        
To implement an interface, use:                                         
flutter:                                                                
  plugin:                                                               
    implements: <plugin-interface>                                      
                                                                        
Plugin `path_provider_linux` doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.
                                                                        
To set a default implementation, use:                                   
flutter:                                                                
  plugin:                                                               
    platforms:                                                          
      linux:                                                            
        default_package: <plugin-implementation>                        
                                                                        
To implement an interface, use:                                         
flutter:                                                                
  plugin:                                                               
    implements: <plugin-interface>                                      
                                                                        
Plugin `path_provider_macos` doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.
                                                                        
To set a default implementation, use:                                   
flutter:                                                                
  plugin:                                                               
    platforms:                                                          
      macos:                                                            
        default_package: <plugin-implementation>                        
                                                                        
To implement an interface, use:                                         
flutter:                                                                
  plugin:                                                               
    implements: <plugin-interface>                                      
                                                                        
Plugin `path_provider_windows` doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.
                                                                        
To set a default implementation, use:                                   
flutter:                                                                
  plugin:                                                               
    platforms:                                                          
      windows:                                                          
        default_package: <plugin-implementation>                        
                                                                        
To implement an interface, use:                                         
flutter:                                                                
  plugin:                                                               
    implements: <plugin-interface>                                      
                                                                        
Plugin `sqflite` doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.
                                                                        
To set a default implementation, use:                                   
flutter:                                                                
  plugin:                                                               
    platforms:                                                          
      macos:                                                            
        default_package: <plugin-implementation>                        
                                                                        
To implement an interface, use:                                         
flutter:                                                                
  plugin:                                                               
    implements: <plugin-interface>                                      
                                                                        
Note: /Users/serkankural/FlutterSdk/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.3/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.                    
Note: /Users/serkankural/FlutterSdk/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.14.4/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.                    
Note: Some input files use or override a deprecated API.                
Note: Recompile with -Xlint:deprecation for details.                    
Note: /Users/serkankural/FlutterSdk/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.18.4+1/android/src/main/java/io/flutter/plugins/firebase/auth/FlutterFirebaseAuthPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.                    
Note: /Users/serkankural/FlutterSdk/flutter/.pub-cache/hosted/pub.dartlang.org/pdf_flutter-1.1.3/android/src/main/java/com/erluxman/pdf_flutter/PdfFlutterPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.                    
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                     153,7s
✓ Built build/app/outputs/flutter-apk/app-release.apk (56.3MB).
Installing build/app/outputs/flutter-apk/app.apk...                 5,7s
Flutter run key commands.
h Repeat this help message.
c Clear the screen
q Quit (terminate the application on the device).
E/flutter (11638): [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 (11638): #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156)
E/flutter (11638): <asynchronous suspension>
E/flutter (11638): #1      MethodChannel.invokeListMethod (package:flutter/src/services/platform_channel.dart:344)
E/flutter (11638): <asynchronous suspension>
E/flutter (11638): #2      MethodChannelFirebase._initializeCore (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:30)
E/flutter (11638): <asynchronous suspension>
E/flutter (11638): #3      MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:75)
E/flutter (11638): <asynchronous suspension>
E/flutter (11638): #4      Firebase.initializeApp (package:firebase_core/src/firebase.dart:43)
E/flutter (11638): <asynchronous suspension>
E/flutter (11638): #5      main (package:atasehir_app/main.dart:10)
E/flutter (11638): <asynchronous suspension>

1 Answers1

0

Let try by this way:

  1. Open "Android" folder inside Flutter project by Android Studio
  2. Sync "Gradle" file once (click on icon Elephant on toolbar)
  3. Run project
  4. Open Flutter project folder and run project again.
DungPhan
  • 356
  • 3
  • 5