4

I renamed my app module in application to presentation module.

  • I put google-services.json in my presentation/
  • Added classpath "com.google.gms:google-services:3.1.0"
  • Added plugin: apply plugin: 'com.google.gms.google-services'

And when i try Sync gradle, i get error:

Error:Execution failed for task ':presentation:processDebugGoogleServices'.
No matching client found for package name 'ru.company.acitive.activelife'

My build.gradle snippet:

dependencies {
    classpath "com.android.tools.build:gradle:$android_plugin_version"
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath "com.google.gms:google-services:3.1.0"
}

My presentation/build.gradle snippet:

dependencies {

...

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
apply plugin: 'com.google.gms.google-services'
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
punchman
  • 1,350
  • 1
  • 13
  • 23

3 Answers3

7

That means your app's application ID is "ru.company.acitive.activelife", but that same string wasn't found in your google-services.json file.

Looks like there's a typo in the part where it says "acitive". Should it be "active" instead?

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
  • I was facing the same issue. After seeing your answer I've just checked again and found a typo in my gradle file. I wrote `com.example.developmnet` in gradle but Firebase contains: `com.example.development`. – Hasan Abdullah Sep 10 '21 at 12:40
1

In addition to ensuring that your gradle androidApplicationID matches your google-services.json (as discussed here), this message can also result from gradle not finding your keystore file.

Be sure to have these entries in your project level build.gradle file:

keystoreStoreFile = _________
keystoreStorePassword = ____________
keystoreKeyAlias = _______________
keystoreKeyPassword = ____________

And be sure to use the same four values when Android Studio prompts you for them during a "Generate Signed APK" opertation.

In my case, I was trying to build the example application ClassyTaxi that Google provides for illustrating subscription services. It has a project level build.gradle file that references a keystorePropertiesFile=keystore.properties. That properties file didn't exist, but there was an example-keystore.properties file that I renamed to keystore.properties and populated it with the four values I had selected. I then used those exact same four values when using Android Studio to generate my signed APK.

B Day
  • 29
  • 5
1

In my own case, the line below in my app-level build.gradle file was the culprit:

applicationIdSuffix ".debug"

I inherited the codebase from another developer, so I wasn't initially aware that this line existed.

Taslim Oseni
  • 6,086
  • 10
  • 44
  • 69