任务“:app:processDebugGoogleServices”执行失败。
No matching client found for package name 'com.example.myapp '
使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。
这是来自 Google Service.json 的客户端部分
“客户端”:[https://stackoverflow.com/questions/66766493/execution-failed-for-task-appprocessdebuggoogleservices-no-matching-clien
{
"client_info": {
"mobilesdk_app_id": "1:110944006455:android:f790b09ad0563a63046ab2",
"android_client_info": {
"package_name": "com.example.myapp"
}
}
这是我的 build.gradledefaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.riderapp "
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
您可以看到两者的应用程序 ID 相同。然而我收到了这个错误:
任务
:app:processDebugGoogleServices
执行失败No matching client found for package name 'com.example.myapp'
最佳答案
两者的应用程序 ID 不同。在谷歌服务 json 中它说 com.example.myapp
但在你的 buildGradle 中是 com.example.riderapp
转到 firebase,使用 buildGradle 中使用的名称再次添加您的应用程序 com.example.riderapp
,在此步骤中也将您的 SHA-1 调试 key 添加到 firebase,然后再次下载您的 json 并删除旧的。并报告发生了什么。
注意:确保保持新的 googlejson 准确命名 google-services.json
关于android - 任务 ':app:processDebugGoogleServices' 执行失败。 > 找不到与包名称 'com.example.myapp ' 匹配的客户端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66766493/