【问题标题】:Ionic Cordova build android fails at :processDebugGoogleServices due to "No matching client found for package name 'io.ionic.starter'"Ionic Cordova build android 在 :processDebugGoogleServices 失败,原因是“找不到与包名称 'io.ionic.starter' 匹配的客户端”
【发布时间】:2019-01-21 13:08:21
【问题描述】:

我正在使用 Ionic 框架来构建移动应用程序。
当我要完成应用程序时,构建失败。
输出如下所示。

Parsing json file: /Users/plum/Documents/Projects/bci-project/app/platforms/android/google-services.json
:processDebugGoogleServices FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugGoogleServices'.
> No matching client found for package name 'io.ionic.starter'

google.services.json,如下:

{
  "project_info": {
    "project_number": "123",
    "firebase_url": "https://cordova-plugin-firebase.firebaseio.com",
    "project_id": "cordova-plugin-firebase",
    "storage_bucket": "cordova-plugin-firebase.appspot.com"
  },
  "client": [
    {
      "client_info": {
        "mobilesdk_app_id": "1:123:android:123",
        "android_client_info": {
          "package_name": "com.github.cordova_plugin_firebase"
        }
      },
      "oauth_client": [
        {
          "client_id": "123.apps.googleusercontent.com",
          "client_type": 3
        }
      ],
      "api_key": [
        {
          "current_key": "123"
        }
      ],
      "services": {
        "analytics_service": {
          "status": 1
        },
        "appinvite_service": {
          "status": 1,
          "other_platform_oauth_client": []
        },
        "ads_service": {
          "status": 2
        }
      }
    }
  ],
  "configuration_version": "1"
}

我尝试编辑 google.services.json 以更改包名称以与 config.xml 匹配,但当我再次构建时,google.services.json 恢复到与以前相同。

【问题讨论】:

    标签: android cordova ionic-framework ionic3


    【解决方案1】:

    尝试使用正确的包名称将 google-services.json 复制到项目的根文件夹,然后构建。 也许您需要重新删除并添加 android 平台

    【讨论】:

      猜你喜欢
      • 2020-10-19
      • 2016-06-22
      • 2019-06-19
      • 1970-01-01
      • 2021-06-20
      • 1970-01-01
      • 2018-11-14
      • 1970-01-01
      • 2018-03-19
      相关资源
      最近更新 更多