当前位置:网站首页>【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
边栏推荐
- Introduction to TiUP
- TiUP 简介
- Recent learning defragmentation (24)
- TiDB 工具适用场景
- Overview of TiDB Tool Functions
- Sparse-PointNet: See Further in Autonomous Vehicles 论文笔记
- The Prospects of the Metaverse and the Four Tracks
- AL遮天传 DL-深度学习模型的训练技巧
- 70 lines of code, a desktop automatic translation artifact
- C# List<T> 模板的案例
猜你喜欢

PMP每日一练 | 考试不迷路-7.30(包含敏捷+多选)

【HMS core】【FAQ】push kit, WisePlay DRM, Location Kit, Health Kit, 3D Modeling Kit, SignPal Kit Typical Questions Collection 4

Placement Rules 使用文档

数据库-SQL

【HMS core】【FAQ】push kit、AR Engine、广告服务、扫描服务典型问题合集2

大厂高管借钱炒股,亏到破产卖房。。。

70行代码撸一个桌面自动翻译神器

(Popular Science) What is Fractional NFT (Fractional NFT)

xxl-job源码解析(技术分享)

Promise Notes (1)
随机推荐
近段时间的学习碎片整理(24)
武汉星起航:海外仓基础建设成为跨境电商企业的一大出海利器
Classes and Objects (Part 2)
Overview of TiDB Tool Functions
Shell脚本的概念
yarn的安装及使用教程
MySql 和 PostgreSQL 数据库 根据一张表update另一张表数据
70 lines of code, a desktop automatic translation artifact
AI遮天传 DL-CNN
php如何截取字符串的前几位
tiup help
后浪来袭!阿里产出“第二代”容器技术手册及脑图,这也太香了吧
AL遮天传 DL-深度学习模型的训练技巧
TiDB 工具下载
使用 TiUP 命令管理组件
tiup list
How to remove last character from string in php
新人学习小熊派网络应用开发
在 Chrome 浏览器中安装 JSON 显示插件
Golang分布式应用之Redis怎么使用