当前位置:网站首页>【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
边栏推荐
- [HMS core] [FAQ] Collection of typical problems of push kit, AR Engine, advertising service, scanning service 2
- Windows MySQL 安装配置
- 近段时间的学习碎片整理(24)
- 70行代码撸一个桌面自动翻译神器
- 如何快速拷贝整个网站所有网页
- 大厂高管借钱炒股,亏到破产卖房。。。
- How to intercept the first few digits of a string in php
- Introduction to kasini3000
- php如何截取字符串的前几位
- How to remove last character from string in php
猜你喜欢
go 学习03 基础知识变量类型
新人学习小熊派网络应用开发
【AGC】开放式测试示例
服务器装好系统的电脑怎么分区
【HMS core】【FAQ】push kit, WisePlay DRM, Location Kit, Health Kit, 3D Modeling Kit, SignPal Kit Typical Questions Collection 4
AL遮天传 DL-深度学习模型的训练技巧
SMI 与 Gateway API 的 GAMMA 倡议意味着什么?
Placement Rules 使用文档
RobotStudio实现喷漆、打磨等功能(曲面路径生成与仿真)
[AGC] Quality Service 2 - Performance Management Example
随机推荐
Data Analysis Tools - DDL operations & DML operations in HQL
php字符串如何去除第一个字符
几种常见的存储器
【HMS core】【FAQ】push kit、AR Engine、广告服务、扫描服务典型问题合集2
服务器装好系统的电脑怎么分区
RobotStudio实现喷漆、打磨等功能(曲面路径生成与仿真)
开源WebGIS架构
tiup help
[HMS core] [FAQ] Collection of typical problems of push kit, AR Engine, advertising service, scanning service 2
L2-007 Family property (use of vector, set, map)
【AGC】开放式测试示例
动态规划 --- 状态压缩DP 详细解释
L2-007 家庭房产(vector、set、map的使用)
rhce笔记2
tiup install
Recent learning defragmentation (24)
五只小猪的案例(五只小猪 比较体重的大小)
【AGC】Open Test Example
在 Chrome 浏览器中安装 JSON 显示插件
TiDB tool download