android - 任务 ':app:processDebugGoogleServices' 执行失败。 > 找不到与包名称 'com.example.myapp ' 匹配的客户端

标签 android ios firebase flutter dart

  • 什么地方出了错:
    任务“: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.gradle
    defaultConfig {
        // 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/

    相关文章:

    ios - 我是否需要包括iPhone X的其他图像尺寸,例如4x图像

    ios - 在 Nativescript 应用程序中修改 Podfile

    android - CodenameOne - FirebaseApp 未初始化

    firebase - 在哪里可以找到 Firebase 部署错误日志?

    android - 我可以使用 Java API 将图像文件存储在 firebase 中吗?

    android - 如何找到android studio中使用的依赖项

    android - 命名 anchor 不工作webview android

    ios - 笑脸评分栏 swift

    android - notifyItemInserted 贵吗

    java - Android登录远程MySQL数据库鉴权