huawei-mobile-services - AppGallery Connect服务集成时提示“miss client id”怎么办?
问题描述
参考AppGallery Connect官方文档进行APM集成打包运行应用时,运行日志显示错误信息:
I/com.huawei.agc.apms: failed to fetch remote config: client token request miss client id, please check whether the 'agconnect-services.json' is configured correctly.
日志如下。 请看日志
根据报错信息,我查看了我的demo项目的agconnect-services.json文件。发现JSON文件中的客户端ID是正确的。
解决方案
您需要将 AppGallery Connect 插件添加到应用级别的build.gradle 文件中。
apply plugin: 'com.android.application'
apply plugin: 'com.huawei.agconnect'
apply plugin: 'com.huawei.agconnect.apms'
AppGallery Connect插件的集成方法请参考以下内容:
推荐阅读
- python - 如何避免 Python 子进程停止执行
- sql - 我们可以在 PGADMIN4 中创建表而不指定数据类型的长度吗?
- data-structures - Ansible在dict中的列表中显示正确的结果和条件
- java - 我应该如何将此 JSON 转换为 POJO 类?
- python - 如何创建和调用 UUID?
- ios - CleverTap 崩溃 - Swift - iOS - [CleverTap generateAppFields]
- sql - 案例陈述顺序 - 无效的列名“年月”
- kubernetes - Kubernetes,配置startupProbe读取stdout日志
- html - 保持 HTML 窗口打开直到用户关闭它
- javascript - Nodejs聚合查找返回空数组