项目中含有将pdf文件分享到其他应用打开的需求,参照鸿蒙文档的调用示例,真机运行时报错
编辑器版本:4.36
鸿蒙文档链接:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V13/share-utd-text-V13
报错信息:
496 WARN: ArkTS:WARN File: E:/hongmeng/jianlizhizuo/resume_hm/unpackage/debug/app-harmony-26d8f534/oh_modules/.ohpm/@dcloudio+uni-app-runtime@onjt5cnkmpxv8bm+y1oo6mnpqjw8oa6bpkmtp8h3hxs=/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-app-harmony/uni.api.ets:7609:13
The system capacity of this api 'scanCore' is not supported on all devices
1 ERROR: ArkTS:ERROR File: E:/hongmeng/jianlizhizuo/resume_hm/unpackage/debug/app-harmony-26d8f534/uni_modules/share-1/utssdk/app-harmony/index.ets:7:72
Argument of type 'UTSJSONObject' is not assignable to parameter of type 'SharedRecord'.
Property 'utd' is missing in type 'UTSJSONObject' but required in type 'SharedRecord'.
2 ERROR: ArkTS:ERROR File: E:/hongmeng/jianlizhizuo/resume_hm/unpackage/debug/app-harmony-26d8f534/uni_modules/share-1/utssdk/app-harmony/index.ets:7:72
Conversion of type '{ utd: utd.UniformDataType; content: string; title: string; description: string; }' to type 'UTSJSONObject' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Type '{ utd: UniformDataType; content: string; title: string; description: string; }' is missing the following properties from type 'UTSJSONObject': _resolveKeyPath, _getValue, get, set, and 8 more.
3 ERROR: ArkTS:ERROR File: E:/hongmeng/jianlizhizuo/resume_hm/unpackage/debug/app-harmony-26d8f534/uni_modules/share-1/utssdk/app-harmony/index.ets:15:30
Conversion of type '{ selectionMode: systemShare.SelectionMode; previewMode: systemShare.SharePreviewMode; }' to type 'UTSJSONObject' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Type '{ selectionMode: SelectionMode; previewMode: SharePreviewMode; }' is missing the following properties from type 'UTSJSONObject': _resolveKeyPath, _getValue, get, set, and 8 more.
4 ERROR: ArkTS:ERROR File: E:/hongmeng/jianlizhizuo/resume_hm/unpackage/debug/app-harmony-26d8f534/uni_modules/share-1/utssdk/app-harmony/index.ets:15:30
Type 'UTSJSONObject' has no properties in common with type 'ShareControllerOptions'.
COMPILE RESULT:FAIL {ERROR:5 WARN:517}
hvigor ERROR: BUILD FAILED in 10 s 413 ms
11:57:00.770 运行包制作失败
枭云 (作者)
多谢,问题已解决
2024-12-06 14:59