When I referred to official documentation of AppGallery Connect for APM integration and packaged and run the app, an error message was displayed in the run log:
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.
The log is as follows. Please see the log
According to the error message, I checked the agconnect-services.json file of my demo project. It was found that the client ID in the JSON file was correct.
You need to add the AppGallery Connect plug-in to the app-level build.gradle file.
apply plugin: 'com.android.application'
apply plugin: 'com.huawei.agconnect'
apply plugin: 'com.huawei.agconnect.apms'
For details about how to integrate the AppGallery Connect plug-in, please refer to the following: