close

[Solved] Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized

I am Trying to add Firebase I have followed all Steps of Integration But Still I am facing following error Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized. Have you added the “google-services.json” file to the project in flutter even I have Added google.services.json file in my project But Still I am facing error. So In this tutorial we will discuss about all possible solution for this error. Lets get Start this article.

How Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized Error Occurs?

I am Trying to add Firebase I have followed all Steps of Integration But Still I am facing following error. Even I have Added google.services.json file in my project But Still I am facing error.

E/flutter (15568): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized. Have you added the "google-services.json" file to the project? 

How To solve Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized Error?

  1. How To solve Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized Error?

    To solve Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized Error All You Need to do Is Just follow this Instruction step by step to resolve this error First of all Open Your your_project/android/build.gradle file and add google-services plugin. Just like below: classpath 'com.google.gms:google-services:4.3.3' And Then, you need to apply this plugin in your_project/android/app/build.gradle file: apply plugin: 'com.google.gms.google-services' And then enable multidex module with following defaultConfig. Now, Flutter clean and then Re run Your project and now your error must be solved. Thank You.

  2. Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized

    To solve Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized Error All You Need to do Is Just follow this Instruction step by step to resolve this error First of all Open Your your_project/android/build.gradle file and add google-services plugin. Just like below: classpath 'com.google.gms:google-services:4.3.3' And Then, you need to apply this plugin in your_project/android/app/build.gradle file: apply plugin: 'com.google.gms.google-services' And then enable multidex module with following defaultConfig. Now, Flutter clean and then Re run Your project and now your error must be solved. Thank You.

Solution 1: Follow This Instruction

All You Need to do Is Just follow this Instruction step by step to resolve this error

  • First of all Open Your your_project/android/build.gradle file and add google-services plugin. Just like below.
buildscript {
   dependencies {
      // ... other dependencies
      classpath 'com.google.gms:google-services:4.3.3'
   }
}
  • And Then, you need to apply this plugin in your_project/android/app/build.gradle file
apply plugin: 'com.google.gms.google-services'
  • And then enable multidex module with following defaultConfig:
android {
  defaultConfig {
    // ...
    minSdkVersion 16
    targetSdkVersion 28
    multiDexEnabled true
  }
}

dependencies {
   implementation 'com.android.support:multidex:1.0.3'
}

Now, Flutter clean and then Re run Your project and now your error must be solved. Thank You.

Conclusion

So This is all About to solve this error. Hope Above Three Solution is Enough to resolve your error. Please Let us know which solution worked For You ? And If Your Error Not Resolved then Just Comment below Our Team will Definitely Help You. Also Comment below your suggestion. Thank You.

Also, Check Out the Below Tutorials

Leave a Comment