uniapp 导入子组件后打包报错 HarmonyOS 鸿蒙Next hvigor ERROR: ArkTS Compiler Error
uniapp 导入子组件后打包报错 HarmonyOS 鸿蒙Next hvigor ERROR: ArkTS Compiler Error
23:36:11.931 打包生成 .hap ..........
23:36:35.834 > hvigor ERROR: ArkTS Compiler Error
1 WARN: ArkTS:WARN File: F:/softdata/uniapp/cxtk/unpackage/debug/app-harmony@1.3.7/entry/src/main/ets/uts/uts.ets:8:72
Usage of 'ESObject' type is restricted (arkts-limited-esobj)
2 WARN: ArkTS:WARN File: F:/softdata/uniapp/cxtk/unpackage/debug/app-harmony@1.3.7/entry/src/main/ets/uts/uts.ets:12:33
Usage of 'ESObject' type is restricted (arkts-limited-esobj)
3 WARN: ArkTS:WARN File: F:/softdata/uniapp/cxtk/unpackage/debug/app-harmony@1.3.7/entry/src/main/ets/uts/uts.ets:12:44
Usage of 'ESObject' type is restricted (arkts-limited-esobj)
...
158 WARN: ArkTS:WARN File: F:/softdata/uniapp/cxtk/unpackage/debug/app-harmony@1.3.7/entry/src/main/ets/uni-app-harmony/uni.api.ets:860:5
Definite assignment assertions are not supported (arkts-no-definite-assignment)
1 ERROR: ArkTS:ERROR File: F:/softdata/uniapp/cxtk/unpackage/debug/app-harmony1/entry/src/main/ets/uni_modules/uni-usercapturescreen/utssdk/app-harmony/index.ets:62:17
Cannot find name 'UTSHarmony'.
解决方案:
将uniapp 打包文件在 DevEco Studio 打开运行,然后点击报错定位到 UTSHarmony,然后右键,选择第一个解决问题,再打包就可以
![cke_3792.png](https://alliance-communityfile-drcn.dbankcdn.com/FileServer/getFile/cmtybbs/564/363/817/0030086000564363817.20241212135807.34100852646059848435201431259453:50001231000000:2800:DF918157FA77A25471CE5788EAD847437163BF4677EA8FF35382B5BD3DE65F29.png)
![cke_170578.png](https://alliance-communityfile-drcn.dbankcdn.com/FileServer/getFile/cmtybbs/564/363/817/0030086000564363817.20241212134749.13046037911570075104791972818079:50001231000000:2800:213C4D35B57C25BF8D9DD609116ED0794BDB2997092C3C4FCB788EAB2AE98661.png)
更多关于uniapp 导入子组件后打包报错 HarmonyOS 鸿蒙Next hvigor ERROR: ArkTS Compiler Error的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
1 ERROR: ArkTS:ERROR File: F:/softdata/uniapp/cxtk/unpackage/debug/app-harmony1/entry/src/main/ets/uni_modules/uni-usercapturescreen/utssdk/app-harmony/index.ets:62:17
Cannot find name ‘UTSHarmony’.
COMPILE RESULT:FAIL {ERROR:2 WARN:418}
上面的最后代码
更多关于uniapp 导入子组件后打包报错 HarmonyOS 鸿蒙Next hvigor ERROR: ArkTS Compiler Error的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
HbuilderX版本是多少?截的都是WARN日志,有没有ERROR日志?
ERROR: ArkTS:ERROR
File: F:/softdata/uniapp/cxtk/unpackage/debug/app-harmony1/entry/src/main/ets/uni_modules/uni-usercapturescreen/utssdk/app-harmony/index.ets:62:17
Cannot find name ‘UTSHarmony’.
COMPILE RESULT:FAIL {ERROR:2 WARN:418}
HbuilderX版本是4.29,