android - google-services.json 找不到与任何模块的包名称匹配的客户端

标签 android firebase

我将应用程序中的 app 模块重命名为 presentation 模块。

  • 我将 google-services.json 放在我的演示文稿中/
  • 添加了类路径“com.google.gms:google-services:3.1.0”
  • 添加插件:应用插件:'com.google.gms.google-services'

当我尝试 Sync gradle 时,出现错误:

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

我的 build.gradle fragment :

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"
}

我的演示文稿/build.gradle fragment :

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'

最佳答案

这意味着您应用的应用程序 ID 是“ru.company.acitive.activelife”,但在您的 google-services.json 文件中找不到相同的字符串。

看起来“主动”部分有错字。它应该改为“Activity ”吗?

关于android - google-services.json 找不到与任何模块的包名称匹配的客户端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48105287/

相关文章:

android - 导入自己的libandroid_tensorflow_inference_java.jar时出现"Native TF methods not found"

javascript - 获取 Cloud Firestore 数据库集合

android - FCM 在不修改客户端代码的情况下从服务器向特定设备发送通知

firebase - 尝试将 Java 客户端授权到 Firestore 时出现 "Credentials failed to obtain metadata"错误

android - 为什么我的 AlarmManager 会立即触发?

android - 防止 Logcat 删除条目

android - 如何实现设备存储卡(ios & android)支付应用程序?

android - ContentObserver onChange() 重复多次

authentication - 使用 Firebase 进行服务器端身份验证

ios - Firebase 和通用链接冲突