0

I don't understand why everything is not working after I did a 'flutter clean'. At nearly the same time I accidentally pressed the Debug button near the play button. Not sure which one messed things up though. Here is the message I get in the console:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'com.example.activities'
tazboy
  • 1,685
  • 5
  • 23
  • 39
  • I think you newly use google-service like firebase, FCM or, etc. You have to add `google-services.json` that you can get from the firebase console into the folder `android/app`. – Alex Sunder Singh Mar 20 '20 at 21:02
  • Check this. Your package names probably don't match. https://stackoverflow.com/questions/34990479/no-matching-client-found-for-package-name-google-analytics-multiple-productf – Suman Maharjan Mar 21 '20 at 03:04

1 Answers1

0

I went back and recreated the google-services.json file from Firebase. The Android Package Name that I chose, after clicking to add an Android App, was incorrect. It wasn't the same as the one I used when I made my app.

I also had to add multiDexEnabled true in the the default config {} of the app\build.gradle file. So now it looks like:

defaultConfig {
    applicationId "com.example.activities"
    minSdkVersion 16
    targetSdkVersion 28
    multiDexEnabled true
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Seems like a non-good idea to add multiDexEnabled to true but it works for now.

tazboy
  • 1,685
  • 5
  • 23
  • 39