TestCrew
Firebase and Android Setup

Fix Default FirebaseApp Is Not Initialized in Android and Flutter

Fix Default FirebaseApp is not initialized and core/no-app errors by checking Android auto-initialization, google-services.json, Flutter initializeApp, processes, and app names.

Published
August 2, 2026
Updated
August 5, 2026
Official info checked
August 3, 2026
TestCrew guide cover for fixing Default FirebaseApp is not initialized

When using Firebase in Android or Flutter, you may see this error:

Default FirebaseApp is not initialized in this process.
Make sure to call FirebaseApp.initializeApp(Context) first.

Flutter may report the same state as:

[core/no-app] No Firebase App '[DEFAULT]' has been created

At the time Firebase Authentication, Firestore, or another service is requested, no default FirebaseApp exists.

The difference between Android and Flutter

Native Android

In a standard Android setup, FirebaseInitProvider uses resources generated from google-services.json to initialize the default FirebaseApp automatically.

You normally do not need to call FirebaseApp.initializeApp() from every Activity.

Flutter

Flutter initializes Firebase explicitly in main():

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );

  runApp(const MyApp());
}

Android cause 1: google-services.json is missing

The standard location is:

app/google-services.json

For Flutter and React Native, it is usually:

android/app/google-services.json

Check the exact file name, application-module location, and any build-variant-specific directories. See Fix File google-services.json Is Missing from Module Root Folder for a complete path checklist.

Android cause 2: The Google Services Plugin is missing

Apply the plugin to the application module:

plugins {
    id("com.android.application")
    id("com.google.gms.google-services")
}

The plugin processes the JSON and generates resources such as google_app_id.

An example generated location is:

app/build/generated/res/google-services/debug/values/values.xml

Android cause 3: The package name does not match

The following values must match:

Gradle applicationId
=
google-services.json package_name

When they differ, register the correct Android package in Firebase and download a new JSON file instead of manually editing identifiers.

Android cause 4: FirebaseInitProvider was removed

Inspect the Merged Manifest and confirm that it contains:

com.google.firebase.provider.FirebaseInitProvider

Search your manifests for removal rules such as:

<provider
    android:name="com.google.firebase.provider.FirebaseInitProvider"
    tools:node="remove" />

Fix the dependency or manifest-merge configuration rather than manually adding a duplicate provider.

Android cause 5: Firebase is accessed too early

Accessing Firebase from top-level or static initialization can make startup order difficult to understand.

Avoid eager initialization such as:

object Repository {
    val auth = FirebaseAuth.getInstance()
}

A lazy dependency is easier to control:

class Repository {
    val auth by lazy {
        FirebaseAuth.getInstance()
    }
}

When standard automatic initialization works correctly, Firebase is generally available during normal application startup. Still, avoid unnecessary dependence on static initialization order.

Android cause 6: Firebase is used from another process

A Service or component configured with android:process may run in a separate process. The error can include a process name such as:

com.example.app:remote

Prefer keeping Firebase work in the main process. If a separate process is essential, verify that the required Firebase initialization and supported SDK behavior exist in that process.

Android cause 7: Only a named app was created

This code creates an app named secondary, not [DEFAULT]:

FirebaseApp.initializeApp(
    context,
    options,
    "secondary"
)

When using a named app, pass it to the service instance you want:

val app = FirebaseApp.getInstance("secondary")
val firestore = FirebaseFirestore.getInstance(app)

Creating a named app does not make FirebaseAuth.getInstance() or other default-app accessors work automatically.

Flutter cause 1: initializeApp is missing

This startup code does not initialize Firebase:

void main() {
  runApp(const MyApp());
}

Accessing FirebaseAuth.instance or another Firebase singleton can then produce core/no-app.

Flutter cause 2: initializeApp is not awaited

Avoid:

void main() {
  Firebase.initializeApp();
  runApp(const MyApp());
}

Wait for initialization before calling runApp():

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  runApp(const MyApp());
}

Flutter cause 3: firebase_options.dart is outdated

Regenerate the configuration for the Firebase project and package currently in use:

flutterfire configure
flutter clean
flutter pub get
flutter run

This is especially important after changing Firebase projects, package names, or supported platforms.

Flutter cause 4: A different main file is built

Projects may have several entry points:

lib/main_development.dart
lib/main_production.dart

The entry point actually used for the build must also initialize Firebase.

flutter run --target lib/main_development.dart

Do not add initialization only to lib/main.dart when another target is used.

Inspect registered Firebase apps

Android:

FirebaseApp.getApps(applicationContext).forEach {
    Log.d("Firebase", "${it.name}: ${it.options.projectId}")
}

Flutter:

for (final app in Firebase.apps) {
  debugPrint('${app.name}: ${app.options.projectId}');
}

A normal single-project setup usually includes [DEFAULT].

Manual initialization is a last resort

Special configurations can construct FirebaseOptions directly:

val options = FirebaseOptions.Builder()
    .setApplicationId("APP_ID")
    .setApiKey("API_KEY")
    .setProjectId("PROJECT_ID")
    .build()

FirebaseApp.initializeApp(applicationContext, options)

Before adding this to a standard Android app, fix the JSON file, Google Services Plugin, generated resources, and FirebaseInitProvider. Manual options can hide an underlying configuration mismatch and create a second source of truth.

Android

  1. google-services.json location
  2. Google Services Plugin
  3. applicationId and package_name
  4. Generated google_app_id
  5. FirebaseInitProvider
  6. Code execution order
  7. Separate processes
  8. Named FirebaseApp instances

Flutter

  1. firebase_core dependency
  2. flutterfire configure
  3. Current firebase_options.dart
  4. WidgetsFlutterBinding.ensureInitialized()
  5. Await Firebase.initializeApp()
  6. Initialize before runApp()
  7. Confirm the actual main entry point

Summary

In native Android, repair the automatic initialization path instead of adding initialization calls everywhere.

In Flutter, keep this order:

WidgetsFlutterBinding.ensureInitialized
→ await Firebase.initializeApp
→ runApp
→ use Firebase services

When the opposite error says [DEFAULT] already exists, see Fix FirebaseApp with Name [DEFAULT] Already Exists.

Primary sources

Official references

Check the linked official documentation before a production release.

Continue reading

TestCrew

Find testers through mutual testing

Test other Android apps, provide useful feedback, and use earned credits to recruit testers for your own Google Play closed test.

Learn how TestCrew works

Analytics settings

TestCrew uses Google Analytics provided by Google LLC to improve the website. You can change whether it is used; this applies to future measurement on this page and later visits. See the Privacy Policy.