Download StackFood Multi Restaurant, Food Delivery App with Laravel Admin and Restaurant Panel Buy Full App on $79
Download FlutKit - Flutter UI Kit Most beautiful Flutter UI Kit with 20+ Full App, 450+ Screens. Buy Full Kit on $39
Download Fluxstore Multi Vendor WooCommerce/Dokan Plugin compatible WordPress eCommerce Flutter App. Buy Full App on $79

How to Solve ʺNo matching client found for package name com.package.nameʺ Error in Flutter

Are you integrating Google Firebase in your Flutter App? During integrating, you may get errors like "No matching client found for package name com.package.name". In this example, we are going to solve this error.

Error Message:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'com.testapp.flutter.testapp'

* Try:
> No matching client found for package name 'com.testapp.flutter.testapp'

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Cause of the Error:

Open AndroidManifest.xml and google-services.json file, and look at the package name. This error occurs when the package names are different. In our case, these files have different package names.

a) android/app/src/main/AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.testapp.flutter.testapp">

Here is package name: com.testap.flutter.testapp

b) android/app/google-services.json

{
  "project_info": {
    "project_number": "1049699819506",
    "project_id": "stackfood-bd3ee",
    "storage_bucket": "stackfood-bd3ee.appspot.com"
  },
  "client": [
    {
      "client_info": {
        "mobilesdk_app_id": "1:1049699819506:android:c80cf797b22c81f089956b",
        "android_client_info": {
          "package_name": "com.sixamtech.stack_food"
        }
      },

Here, package_name is 'com.sixamtech.stack_food', this is the code of Stack Food, best Resturant and Delivery App

Make sure, both files have the same package name.

Solution 1: 

Change the package name exactly like on google-service.json file

Solution 2:

Generate a new google-services.json file

Step 1: Go to Google Firebase Console and create a new project.

Step 2: After Creating a project, click on "Android Icon" below your project name.

Step 3: You will get the form to enter your package name and app name.

Enter your package and app name correctly and click on "Register App".

Step 4: Download Config file 'google-services.json' and replace it at android/app/ folder.

Step 5: Complete all the procedures and run your app.

In this way, you can solve "No matching client found for package name com.package.name" Error in Flutter

No any Comments on this Article


Please Wait...