🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours scrolling social media and waste money on things we forget, but won’t spend 30 minutes a day earning certifications that can change our lives.
Master in DevOps, SRE, DevSecOps & MLOps by DevOpsSchool!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

[Solved] Flutter : [core/not-initialized] Firebase has not been correctly initialized. Have you added the “google-services.json” file to the project?

Problem

I’ve connected my flutter app to firebase by adding SHA1 key ( How to Get SHA-1 key in Android Studio for Firebase. ) and package name in firebase console, and also downloaded and provided google-service.json in my flutter app at android/app. But when i run app its Showing an error that i’ve not provided google-service.json file in my app. The Error Says –

<span class="has-inline-color has-vivid-red-color">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? 
E/flutter (15568): </span>
Code language: HTML, XML (xml)

Solution

After hours of struggle, I am able to figure out the solution.

1. First, add the ‘google-services.json‘ plugin as a dependency inside of the android/build.gradle file:

 buildscript {
      dependencies {
        // ... other dependencies
        <strong><span class="has-inline-color has-vivid-red-color">classpath 'com.google.gms:google-services:4.3.3'</span></strong>
      }
    }Code language: HTML, XML (xml)

2. Lastly, execute the plugin by adding the following underneath the line apply plugin:
add after ‘com.android.application’, within the /android/app/build.gradle file:

<span class="has-inline-color has-vivid-red-color"><strong>apply plugin: 'com.google.gms.google-services'</strong></span>Code language: HTML, XML (xml)

That’s All.

Thanks for Reading.

Keep Coding.

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.