集成AppGallery Connect服务提示"miss client id",如何处理?

What Can I Do When the Message "miss client id" Is Displayed During AppGallery Connect Service Integration?

当我参考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.

日志如下。 Please see the log

根据报错信息,查看了我的demo工程的agconnect-services.json文件。发现JSON文件中的客户端ID是正确的。

您需要在app-levelbuild.gradle文件中添加AppGallery Connect插件。

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