ProKit Flutter - Documentation
ProKit Flutter

No matching client found for package name

πŸ•’ Estimated Reading: 1 minutes
πŸ“‚ Location: 
Common Errors β†’ No Matching Client Found for Package Name

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

❗ Error Overview

If you encounter the error message:
β€œNo matching client found for package name”
it means that the package name specified in your google-services.json file does not match the applicationId in your app’s build.gradle file.

This mismatch prevents Firebase from correctly identifying your application, resulting in a configuration error.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

πŸ› οΈ Reason

Firebase requires the package name (package_name) in the google-services.json file to exactly match the applicationId defined in your Android project’s build.gradle file.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

βœ… How to Fix It (Step-by-Step)

Follow these steps to resolve the issue:

  1. Open the google-services.json file, which is typically located in the android/app directory of your Flutter project.
  2. Look for the package_name field in the google-services.json file. This should match the package name you intend to use for your application.
  3. Next, open the build.gradle file in the android/app directory of your project.
  4. Find the build.gradle file, locate the defaultConfig section. Inside this section:
    defaultConfig {applicationId β€œcom.example.yourapp”}
    β†’ Ensure the applicationId exactly matches the package_name from google-services.json.
  5. If the values do not match, do one of the following:
    • Update the applicationId in build.gradle
      OR
    • Update the google-services.json from Firebase Console with the correct package_name.
  6. Save the changes made to both files.
  7. Clean and rebuild the project by running these commands in your terminal:
    • flutter clean
    • flutter run

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

πŸ” Reference

For more information, visit the officialΒ Firebase Configuration Guide

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

βœ… Following the above steps will resolve the mismatch error and let Firebase recognize your app correctly.