首页 > 解决方案 > 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是正确的。

标签: huawei-mobile-servicesappgalleryhuawei-push-notification

解决方案


您需要将 AppGallery Connect 插件添加到应用级别的build.gradle 文件中。

apply plugin: 'com.android.application'
apply plugin: 'com.huawei.agconnect'
apply plugin: 'com.huawei.agconnect.apms'

AppGallery Connect插件的集成方法请参考以下内容:

https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-get-started#h2-1587477308727?ha_source=hms1


推荐阅读