Hello,
I need to use HMS Analytics Plugin, in order to integrate the app with Huawei Analytics SDK.
I've installed the plugin from Forge (https://www.outsystems.com/forge/component-overview/10654/hms-analytics-plugin).
I've also followed the Huawei documentation (https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides-V1/out-sysytem-dev-process-0000001079635418-V1), in order to configure and generate the agconnect-services.json file (I can only attach 1 file to this post):
{
"agcgw":{
"backurl":"connect-drcn.hispace.hicloud.com",
"url":"connect-drcn.dbankcloud.cn",
"websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.com",
"websocketurl":"connect-ws-drcn.hispace.dbankcloud.cn"
},
"agcgw_all":{
"CN":"connect-drcn.dbankcloud.cn",
"CN_back":"connect-drcn.hispace.hicloud.com",
"DE":"connect-dre.dbankcloud.cn",
"DE_back":"connect-dre.hispace.hicloud.com",
"RU":"connect-drru.hispace.dbankcloud.ru",
"RU_back":"connect-drru.hispace.dbankcloud.cn",
"SG":"connect-dra.dbankcloud.cn",
"SG_back":"connect-dra.hispace.hicloud.com"
"websocketgw_all":{
"CN":"connect-ws-drcn.hispace.dbankcloud.cn",
"CN_back":"connect-ws-drcn.hispace.dbankcloud.com",
"DE":"connect-ws-dre.hispace.dbankcloud.cn",
"DE_back":"connect-ws-dre.hispace.dbankcloud.com",
"RU":"connect-ws-drru.hispace.dbankcloud.ru",
"RU_back":"connect-ws-drru.hispace.dbankcloud.cn",
"SG":"connect-ws-dra.hispace.dbankcloud.cn",
"SG_back":"connect-ws-dra.hispace.dbankcloud.com"
"client":{
"cp_id":"10244000020503499",
"product_id":"99536292102405428",
"client_id":"918799681373359296",
"client_secret":"4DDC4569B94F65FF73F42BE5EBACC5D7B5BAD5AF852500F301F3AB70334274A5",
"project_id":"99536292102405428",
"app_id":"106520803",
"api_key":"DAEDAKtoCd9pB3EdpITPXrpqSILC6ysX1i89hYxGDTdeWMw7uBG1e8ujLLF7u4kKBlMLQcLelXrn84mFBF70vtbL+xbvXA4B1dBL2Q==",
"package_name":"bfanapp.bfa.ao"
"oauth_client":{
"client_id":"106520803",
"client_type":1
"app_info":{
"service":{
"analytics":{
"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
"collector_url_ru":"datacollector-drru.dt.dbankcloud.ru,datacollector-drru.dt.hicloud.com",
"collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn",
"collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn",
"collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
"resource_id":"p1",
"channel_id":""
"search":{
"url":"https://search-drcn.cloud.huawei.com"
"cloudstorage":{
"storage_url_sg_back":"https://agc-storage-dra.cloud.huawei.asia",
"storage_url_ru_back":"https://agc-storage-drru.cloud.huawei.ru",
"storage_url_ru":"https://agc-storage-drru.cloud.huawei.ru",
"storage_url_de_back":"https://agc-storage-dre.cloud.huawei.eu",
"storage_url_de":"https://ops-dre.agcstorage.link",
"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn",
"storage_url_sg":"https://ops-dra.agcstorage.link",
"storage_url_cn_back":"https://agc-storage-drcn.cloud.huawei.com.cn",
"storage_url_cn":"https://agc-storage-drcn.platform.dbankcloud.cn"
"ml":{
"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
}
"region":"CN",
"configuration_version":"3.0",
"appInfos":[
"package_name":"bfanapp.bfa.ao",
"app_id":"106520803"
"client_type":1,
"client_id":"106520803"
]
I've added this file to the app resources, and also added the plugin to the dependencies, as it's mentioned in the documentation.
However, when I've generated the app, I got the following error for Android (see "AndroidBuildLog.txt" attached):
[2022-08-30T16:39:54.274Z] [ERROR] [Build] -- v --
[2022-08-30T16:39:54.275Z] [ERROR] [Build] The build phase failed to complete!
[2022-08-30T16:39:54.275Z] [ERROR] [Build] Reason: Couldn't generate your app. If the problem persists, check our documentation for more information.
[2022-08-30T16:39:54.276Z] [ERROR] [Build] Additional information:
[2022-08-30T16:39:54.276Z] [ERROR] [Build] FAILURE: Build failed with an exception.
[2022-08-30T16:39:54.276Z] [ERROR] [Build] * Where:
[2022-08-30T16:39:54.276Z] [ERROR] [Build] Build file 'source/platforms/android/build.gradle' line: 1
[2022-08-30T16:39:54.276Z] [ERROR] [Build] * What went wrong:
[2022-08-30T16:39:54.276Z] [ERROR] [Build] A problem occurred evaluating root project 'BFA App 2.0'.
[2022-08-30T16:39:54.276Z] [ERROR] [Build] > Could not find method classpath() for arguments [com.huawei.agconnect:agcp:1.4.2.301] on root project 'BFA App 2.0' of type org.gradle.api.Project.
[2022-08-30T16:39:54.276Z] [ERROR] [Build] * Try:
[2022-08-30T16:39:54.276Z] [ERROR] [Build] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[2022-08-30T16:39:54.276Z] [ERROR] [Build] * Get more help at https://help.gradle.org
[2022-08-30T16:39:54.276Z] [ERROR] [Build] BUILD FAILED in 48s
[2022-08-30T16:39:54.276Z] [ERROR] [Build] Command failed with exit code 1: source/platforms/android/gradlew cdvBuildDebug -b source/platforms/android/build.gradle --parallel
[2022-08-30T16:39:54.276Z] [ERROR] [Build] -- ^ --
Can you help us with this issue?
This configuration was done in development environment. We also have another 3 environments (QA, PREPROD and PROD), and Android and iOS apps.
Do we have to generate different agconnect-services.json files, for each environment and/or OS? If so, that's not mentioned in the documentation.
Thank you in advance.
João Matias