[问答]

windows平台编译 harmony code 1.1.1-LTS 版本 utf-8问题 hi3861

285 HarmonyOS
分享
初始化代码后build编译报错内容如下

Processing hi3861 (platform: hisilicon; board: hi3861; framework: hb)
----------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabLED via `-v, --verbose` option
builder(["out\hispark_pegasus\wifiiot_hispark_pegasus\Hi3861_wifiiot_app.out"], [])
[OHOS INFO] [1/46] AR libs/libbroadcast.a
[OHOS INFO] [2/46] gcc cross compiler obj/foundation/distributedschedule/samgr_lite/samgr/source/libsamgr.samgr_lite.o
[OHOS INFO] [3/46] gcc cross compiler obj/foundation/distributedschedule/samgr_lite/samgr/adapter/cmsis/libsamgr_adapter.memory_adapter.o     
[OHOS INFO] [4/46] gcc cross compiler obj/foundation/distributedschedule/samgr_lite/samgr/adapter/cmsis/libsamgr_adapter.queue_adapter.o      
[OHOS INFO] [5/46] gcc cross compiler obj/utils/native/lite/kv_store/src/kvstore_impl_hal/libutils_kv_store.kv_store.o
[OHOS INFO] [6/46] gcc cross compiler obj/utils/native/lite/kv_store/src/kvstore_common/libutils_kv_store.kvstore_common.o
[OHOS INFO] [7/46] STAMP obj/applications/sample/wifi-iot/app/startup/startup.stamp
[OHOS INFO] [8/46] COPY ../../../foundation/distributedschedule/samgr_lite/config/system_capability.json obj/foundation/distributedschedule/samgr_lite/config/system_capability.json
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR]   File "c:\users\qylin\.deveco-device-tool\core\deveco-venv\lib\site-packages\hb\__main__.py", line 80, in main
[OHOS ERROR]     status = args.command(args)
[OHOS ERROR]   File "c:\users\qylin\.deveco-device-tool\core\deveco-venv\lib\site-packages\hb\build\build.py", line 94, in exec_command      
[OHOS ERROR]     return build.build(args.full, cmd_args=cmd_args)
[OHOS ERROR]   File "c:\users\qylin\.deveco-device-tool\core\deveco-venv\lib\site-packages\hb\build\build_process.py", line 119, in build     
[OHOS ERROR]     exec_cmd(cmd_args)
[OHOS ERROR]   File "c:\users\qylin\.deveco-device-tool\core\deveco-venv\lib\site-packages\hb\build\build_process.py", line 200, in ninja_build
[OHOS ERROR]     exec_command(ninja_cmd, log_path=self.config.log_path, log_filter=True)
[OHOS ERROR]   File "c:\users\qylin\.deveco-device-tool\core\deveco-venv\lib\site-packages\hb\common\utils.py", line 113, in exec_command     
[OHOS ERROR]     for line in iter(process.stderr.readline, ''):
[OHOS ERROR]   File "C:\Users\qylin\AppData\Local\Programs\Python\Python38\lib\Codecs.py", line 322, in decode
[OHOS ERROR]     (result, consumed) = self._buffer_decode(data, self.errors, final)
[OHOS ERROR] UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbe in position 24: invalid start byte
[OHOS ERROR] Unhandled error: 'utf-8' codec can't decode byte 0xbe in position 24: invalid start byte

*** [out\hispark_pegasus\wifiiot_hispark_pegasus\Hi3861_wifiiot_app.out] Error -1


4
屏幕截图 2021-07-16 171355.png
已退回4积分
2021-7-16 15:57:02   评论 分享淘帖 邀请回答
3个回答
2021-7-16 17:16:02 1 评论

举报

1 条评论
  • 2021-8-27 10:30

    https://developer.huawei.com/consumer/cn/forum/topic/0201607886750140196?fid=26
    1. 工具链配置项,最好参考一下这个
    2. 关于MSYS的要求,看一下是否匹配

建议检查下编译工具链的版本,配置,参考
https://device.harmonyos.com/cn/docs/ide/user-guides/tools_management-0000001141455367
2021-7-31 07:35:23 评论

举报

本帖最后由 txwtech 于 2021-8-27 09:40 编辑

建议先用自带的程序先编译测试一下。确认编译环境搭建没有问题,
然后再把app目录的build.gn文件修改成自己写的代码,再build一次
2.jpg
---
1.jpg



2021-8-27 09:38:17 评论

举报

撰写答案

你正在撰写答案

如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。

您需要登录后才可以回帖 登录 | 注册

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容图片侵权或者其他问题,请联系本站作侵删。 侵权投诉
我要提问
快速回复
扫一扫分享
返回顶部 返回列表