- 发布:2026-01-20 20:28
- 更新:2026-01-20 20:29
- 阅读:20
产品分类: uniapp/App
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: macos 26.2
HBuilderX版本号: 4.87
手机系统: HarmonyOS NEXT
手机系统版本号: HarmonyOS 6.0.0
手机厂商: 华为
手机机型: mate80promax
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: CLI
CLI版本号: unibest-version: "3.18.9"
操作步骤:
`
使用"wot-design-uni": "^1.13.0",
<wd-picker
v-model="formData.genderText"
label="性别"
prop="genderText"
placeholder="请选择性别"
columns="genderOptions"
required
clearable
custom-class="picker-arrow-down"
rules="formRules.genderText"
@confirm="handleGenderConfirm"
/>
`
clearable
custom-class="picker-arrow-down" rules="formRules.genderText" @confirm="handleGenderConfirm"
/>
`
预期结果:
正常编译打包
正常编译打包
实际结果:
hvigor ERROR: Failed :entry:default@CompileArkTS...
20:20:48.104 > hvigor ERROR: ArkTS Compiler Error
20:20:48.104 1 ERROR: 10905237 ArkTS Compiler Error
20:20:48.104 Error Message: The struct name cannot contain reserved tag name: 'Picker'. At File: /Users/amor/wlyd/uniapp-wmall/dist/dev/app-harmony/oh_modules/.ohpm/@dcloudio+uni-app-runtime@e61xy4t7udv6xbickvvkkdflr0p30afaiftcwqggq70=/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/components/Picker.ets:112:15
20:20:48.104 2 ERROR: 10905227 ArkTS Compiler Error
20:20:48.104 Error Message: The struct 'Picker' cannot have the same name as the built-in component 'Picker'. At File: /Users/amor/wlyd/uniapp-wmall/dist/dev/app-harmony/oh_modules/.ohpm/@dcloudio+uni-app-runtime@e61xy4t7udv6xbickvvkkdflr0p30afaiftcwqggq70=/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/components/Picker.ets:112:14
20:20:48.104 COMPILE RESULT:FAIL {ERROR:3 WARN:635}
20:20:48.104 * Try:
20:20:48.104 > Run with --stacktrace option to get the stack trace.
20:20:48.104 > Run with --debug option to get more log output.
20:20:48.104 > hvigor ERROR: BUILD FAILED in 9 s 805 ms
20:20:48.545 运行包制作失败
hvigor ERROR: Failed :entry:default@CompileArkTS...
20:20:48.104 > hvigor ERROR: ArkTS Compiler Error
20:20:48.104 1 ERROR: 10905237 ArkTS Compiler Error
20:20:48.104 Error Message: The struct name cannot contain reserved tag name: 'Picker'. At File: /Users/amor/wlyd/uniapp-wmall/dist/dev/app-harmony/oh_modules/.ohpm/@dcloudio+uni-app-runtime@e61xy4t7udv6xbickvvkkdflr0p30afaiftcwqggq70=/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/components/Picker.ets:112:15
20:20:48.104 2 ERROR: 10905227 ArkTS Compiler Error
20:20:48.104 Error Message: The struct 'Picker' cannot have the same name as the built-in component 'Picker'. At File: /Users/amor/wlyd/uniapp-wmall/dist/dev/app-harmony/oh_modules/.ohpm/@dcloudio+uni-app-runtime@e61xy4t7udv6xbickvvkkdflr0p30afaiftcwqggq70=/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/components/Picker.ets:112:14
20:20:48.104 COMPILE RESULT:FAIL {ERROR:3 WARN:635}
20:20:48.104 * Try:
20:20:48.104 > Run with --stacktrace option to get the stack trace.
20:20:48.104 > Run with --debug option to get more log output.
20:20:48.104 > hvigor ERROR: BUILD FAILED in 9 s 805 ms
20:20:48.545 运行包制作失败
bug描述:
uniapp 运行到鸿蒙系统,真机和虚拟机都报错
依赖 版本
Vue 3.4.21
Vite 5.2.8
Pinia 2.0.36
TypeScript ~5.8.0
UnoCSS 66.0.0
hvigor ERROR: Failed :entry:default@CompileArkTS...
20:20:48.104 > hvigor ERROR: ArkTS Compiler Error
20:20:48.104 1 ERROR: 10905237 ArkTS Compiler Error
20:20:48.104 Error Message: The struct name cannot contain reserved tag name: 'Picker'. At File: /Users/amor/wlyd/uniapp-wmall/dist/dev/app-harmony/oh_modules/.ohpm/@dcloudio+uni-app-runtime@e61xy4t7udv6xbickvvkkdflr0p30afaiftcwqggq70=/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/components/Picker.ets:112:15
20:20:48.104 2 ERROR: 10905227 ArkTS Compiler Error
20:20:48.104 Error Message: The struct 'Picker' cannot have the same name as the built-in component 'Picker'. At File: /Users/amor/wlyd/uniapp-wmall/dist/dev/app-harmony/oh_modules/.ohpm/@dcloudio+uni-app-runtime@e61xy4t7udv6xbickvvkkdflr0p30afaiftcwqggq70=/oh_modules/@dcloudio/uni-app-runtime/src/main/ets/uni-mp-sdk/components/Picker.ets:112:14
20:20:48.104 COMPILE RESULT:FAIL {ERROR:3 WARN:635}
20:20:48.104 * Try:
20:20:48.104 > Run with --stacktrace option to get the stack trace.
20:20:48.104 > Run with --debug option to get more log output.
20:20:48.104 > hvigor ERROR: BUILD FAILED in 9 s 805 ms
20:20:48.545 运行包制作失败
1 个回复
Ask小助手 - Ask社区AI助手
作为DCloud官方人员,我来评审这个bug反馈:
反馈质量评价
该bug反馈整体质量较高,内容较为完整:
建议补充:说明是否已尝试过更新HBuilderX或uni-app相关依赖,以及是否在纯uni-app项目(不依赖wot-design-uni)中也存在此问题。
问题分析
此问题确实存在,属于已知兼容性问题。根据我们的知识库记录:
您的错误日志完全匹配这一已知问题:
问题原因
这是由于华为开发者工具(Deveco)更新到6.0.2 beta版本后,对ArkTS编译规则进行了更严格的限制,禁止自定义组件使用与系统内置组件相同的名称。uni-app运行时中的Picker组件与鸿蒙系统内置的Picker组件发生了命名冲突。
解决方案
请参考官方问题解答:https://ask.dcloud.net.cn/question/217087
临时解决方案包括:
注意事项
建议关注DCloud官方公告,我们会尽快发布修复版本。同时,您可以通过插件市场搜索是否有替代的picker组件可用:https://ext.dcloud.net.cn/search?q=picker
要回复问题请先登录或注册
公告
更多>相关问题