MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

[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.

Animated cat typing on a laptop, captioned keep coding

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
With MotoShare.in, you can book a bike instantly, enjoy doorstep delivery, and ride without worries. Perfect for travelers, professionals, and adventure enthusiasts looking for a seamless mobility solution.

Related Posts

[SOLVED] Flutter : PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null)

ERROR PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null) SOLUTION The following solution works in the flutter project: Step 1: Generate SHA1 and SHA256 keys. (Don’t know how to…

Read More

How to create Firebase Console for Flutter Database?

First Go to https://console.firebase.google.com/ and click on plus icon like below- After that fill input box as you wish project name like below- and click continue fsd…

Read More

Flutter: [core/no-app] No Firebase App ‘[DEFAULT]’ has been created – call Firebase.initializeApp()

If you get such type of error When you run a Project in Flutter App using Firebase then – open “pubspec.yaml” and paste in “dependencies:” like below:…

Read More

Top 10 Mobile Performance Monitoring Tools: Features, Pros, Cons & Comparison

Introduction Mobile Performance Monitoring (MPM) tools are specialized solutions designed to measure, analyze, and optimize the performance of mobile applications across devices, operating systems, and real-world network…

Read More

Top 10 Mobile Analytics SDKs: Features, Pros, Cons & Comparison

Introduction Mobile Analytics SDKs are specialized software development kits that developers integrate directly into mobile applications to collect, analyze, and interpret user behavior data. These SDKs track…

Read More

Top 10 Mobile App Development Platforms: Features, Pros, Cons & Comparison

Introduction Mobile App Development Platforms are software frameworks and toolsets that help individuals and organizations design, build, test, deploy, and maintain mobile applications for Android, iOS, and…

Read More