我将应用程序中的 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/