Search code examples
huawei-mobile-servicesappgalleryhuawei-push-notification

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


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.


Solution

  • 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:

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