当前位置:网站首页>【HMS core】【FAQ】A collection of typical questions about Account, IAP, Location Kit and HarmonyOS 1
【HMS core】【FAQ】A collection of typical questions about Account, IAP, Location Kit and HarmonyOS 1
2022-07-30 16:01:00 【Huawei developers BBS】
1. Reference Location ServicesSDK后,版本高于6.2.0.300时,编译报错.
问题描述:
在集成IAP时,Meet Hongmeng2.0Version clientApp会出现无法启动的情况,更新最新版本,使用SDK的最新版本,切换到com.huawei.hms:location:6.2.0.30and the above version will fail to compile.
Screenshot of the error message:

解决方案一:
不是location kit升级导致的,建议查一下ASSome errors when synchronizing projects,如:
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException
Caused by: com.android.builder.merge.DuplicateRelativeFileException
The two solutions can be reference:
https://stackoverflow.com/questions/57997668/project-fails-to-compile-after-renaming
解决方案二:
(If you keep using this version:implementation 'com.huawei.hms:location:6.0.0.302',同样的环境,升级到6.2.0.300或6.3.0.302It will prompt compilation error,Whether to add cullinglibstlport_shared.so,also not using the relevant library,是否因为LocationThe library contains thisso)
在app/build.gradleAdd to avoid unnecessary dependency files
packagingOptions {
exclude 'core.properties'
}2. When logging in,会弹出dialogload circle,导致window的DecorView状态改变,The position of the bangs in the extension background made by the mobile phone has black borders.
问题描述:
Authorize mobile phone login with Huawei mobile account,dialogNo black bars appear when loading,dialogThe bangs appear black covering the page when they appear.


agc登陆时,Huawei account for authorization,At the time of authorization pop-updialog,Flowing sea appears black cover.
初步分析:
When logging in,会弹出dialogload circle,导致window的DecorView状态改变,The position of the bangs in the extension background made by the mobile phone has black borders
解决方案:
After and account development andHMS Core Framework Development Joint Confirmation,This is a known issue that has been located before,650already requested,There is an interface on this side of the framework that does not adapt to the knockout screen,At that time, you should need to adjust it with the account.,Because only modifying the knockout screen adaptation of the frame transparent page cannot solve the problem.后面的HMS Core 640The version upgrade will be resolved.
3. 鸿蒙开发,在library中js如何实现国际化
问题描述:
library中,js实现国际化,在i18n下的zh-CN.json添加字符串(如下图),通过this.$t('strings.app_not_install')获取字符串,希望在libraryThe internationalized string can be obtained normally in

初步分析:
Hongmeng development can be found inentry中国际化,
If you want to modify its internationalized resource file,找到js下default下i18n下zh-CN.json.Then modify it to the displayed text,重新运行.

该问题可以参考的文档如下:
鸿蒙基于JS搭建HelloWorldand modify the internationalization file_霸道流氓气质的博客-CSDN博客
解决方案:
jsFor internationalization, please refer to the latest application configuration.
该问题可以参考的文档如下:
4. Error receiving notifications for subscription key events
问题描述:
When receiving notifications of subscribed key events,Analysis according to the example codeJSON内容,内容为空.
附代码:
header("Content-Type: application/json; charset=utf-8");
file_get_contents("php://input");
$request = json_decode($raw_post_data,false);
var_dump($request);
$response = new StatusUpdateNotificationResponse();
if(empty( $request->statusUpdateNotification)|| empty($request->notifycationSignature))
{
$response->errorCode = 1; //failure
$response->errorMsg = "the notification message is empty";
echo $response->buildResponse();
return;
}调用了IAPThe interface to receive the subscription event URL:https://www.zymap.xyz/hwMessage.php
实际返回的结果:{"result":1,"errorMsg":"the notification message is empty"}
初步分析:
Is the server-side subscription to key event notifications,无法解析JSON的问题.
Subscribe to the event address configuration may refer to this document:
注意:It is recommended that allAppconfigure the notification address,in order to receive notifications of key events for subscribed items,Provide customers with better、more timely service.另外,Notify address must be based onHTTPSand is configured with a certificate issued by a commercial domain name authority.
解决方案:
Configured to subscribe notification still can not receive.检查发现:jsonThere is something wrong with the file itself,格式不正确,Problem with escaping,导致json数据破坏了
So the frame side has not been dealt with,Have you done anything with this data?.And to receive subscription notification content to usestring来接受.
欲了解更多更全技术文章,欢迎访问https://developer.huawei.com/consumer/cn/forum/?ha_source=zzh
边栏推荐
猜你喜欢

深度学习遇到报错Bug解决方法(不定时更新)

SMI 与 Gateway API 的 GAMMA 倡议意味着什么?

类和对象(下篇)

【HMS core】【Media】【视频编辑服务】 在线素材无法展示,一直Loading状态或是网络异常

武汉星起航:海外仓基础建设成为跨境电商企业的一大出海利器

【C语言】指针和数组的深入理解(第二期)

谷歌工程师『代码补全』工具;『Transformers NLP』随书代码;FastAPI开发模板;PyTorch模型加速工具;前沿论文 | ShowMeAI资讯日报

配置Path环境变量
![[HMS core] [FAQ] A collection of typical questions about push kit, analysis services, and video editing services 3](/img/7a/e7447b21421f3052c0b6c44d1c2817.png)
[HMS core] [FAQ] A collection of typical questions about push kit, analysis services, and video editing services 3

在树莓派上驱动CSI摄像头
随机推荐
如何快速拷贝整个网站所有网页
涨姿势了!原来这才是多线程正确实现方式
vite 多页面应用刷新页面时,不会在当前路由中,会返回到根路由
Data Analysis Tools - DDL operations & DML operations in HQL
Introduction to TiUP
云风:不加班、不炫技,把复杂的问题简单化
tiup install
nodejs environment variable settings
C语言学习之旅 【函数(二)】
Redis 复习计划 - Redis 数据结构和持久化机制
Flask之路由(app.route)详解
开源WebGIS架构
谷歌工程师『代码补全』工具;『Transformers NLP』随书代码;FastAPI开发模板;PyTorch模型加速工具;前沿论文 | ShowMeAI资讯日报
yarn安装详细教程说明、升级教程、修改yarn的全局和缓存目录、yarn基本命令
函数调用方式_stdcall 、 _cdecl 、_thiscall
TiUP 简介
类和对象(下篇)
tiup list
RISC-V calling conventions
C#西门子S7 协议通过偏移量的方式读写PLC DB块