uni-app x是编译为ArkTS,不管在普通页面还是在uts插件中均可调用鸿蒙原生API,但是我在使用的时候出现
"BusinessError" is imported from external module "@kit.BasicServicesKit" but never used in "../../../uniapp project/toyball/utils/bluetooth.uts".
@kit开头的包无法在页面或组件内正常使用,请改用其他方式引用,或使用uts插件引用。

2***@qq.com
- 发布:2025-07-09 16:59
- 更新:2025-07-10 15:02
- 阅读:120



DCloud_UNI_OttoJi - 日常回复 uni-app/x 问题,如果艾特我没看到,请主动私信
要解决你这个问题,你可以从 kit 里点进去看原始定义,查看这个 api 是如何从 ohos 里导出的。具体到你这个问题,你可以尝试 使用这个方案在 页面中使用 import ble from '@ohos.bluetooth.ble';