punchman
punchman

Reputation: 1380

google-services.json No matching client found for package name with any module

I renamed my app module in application to presentation module.

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'

Upvotes: 4

Views: 14590

Answers (3)

Taslim Oseni
Taslim Oseni

Reputation: 6263

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.

Upvotes: 1

B Day
B Day

Reputation: 29

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.

Upvotes: 1

Doug Stevenson
Doug Stevenson

Reputation: 317487

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?

Upvotes: 7

Related Questions