Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for package name 'com.example.myapp '

  • What went wrong: Execution failed for task ':app:processDebugGoogleServices'.

No matching client found for package name 'com.example.myapp '

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

This is a client portion from Google Service.json

"client": [https://stackoverflow.com/questions/66766493/execution-failed-for-task-appprocessdebuggoogleservices-no-matching-clien {

  "client_info": {

"mobilesdk_app_id": "1:110944006455:android:f790b09ad0563a63046ab2",
"android_client_info": {
  "package_name": "com.example.myapp"
}
}

And here is my build.gradle

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.riderapp "
    minSdkVersion 16
    targetSdkVersion 28
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
}

You can see that the application ID for both is same. Yet I receiver this error:

  • What went wrong: Execution failed for task :app:processDebugGoogleServices

No matching client found for package name 'com.example.myapp'

like image 882
Habeeb E Sadeed Avatar asked Jan 25 '23 10:01

Habeeb E Sadeed


1 Answers

The application Id for both is not the same. In google services json it says com.example.myapp

But in your buildGradle it's com.example.riderapp

Go to firebase, add your app again with the name used in buildGradle com.example.riderapp, add your SHA-1 debug key to firebase in this step also, then download your json again and remove the old one. And report back what happens.

Note: make sure to keep the new googlejson named exactly google-services.json

like image 68
Huthaifa Muayyad Avatar answered Feb 04 '23 02:02

Huthaifa Muayyad