【HMS Core】升级SDK报错app_id failed: java.io.FileNotFoundException: agconnect-services.json
问题描述:
升级推送服务最新版SDK报错app_id failed: java.io.FileNotFoundException: agconnect-services.json
问题分析:
从日志来看,是没有找到agconnect-services.json文件。
解决方案:
1、将“agconnect-services.json”文件拷贝到应用级根目录下。
2、打开Android Studio项目级“build.gradle”文件,在“buildscript > dependencies”中增加AGC插件配置。
3、打开应用级的“build.gradle”文件,添加AGC插件配置。请根据实际情况选择:
方式一:在文件头部声明下一行添加如下配置。
方式二:在plugins中添加如下配置。
欲了解更多更全技术文章,欢迎访问https://developer.huawei.com/consumer/cn/forum/?ha_source=zzh


浙公网安备 33010602011771号