更多信息请访问:Harmonyos.51cto.comHarmonyos.51cto.com我使用Ubuntu虚拟机编译鸿蒙源码。DevEcoDeviceTool2.2Beta1可在Windows上一站式编译。现在就试试。1、准备工作参考社区文档,参考官网文档部署Windows环境。从官网下载HUAWEIDevEcoDeviceTool2.2Beta1,简称DDT,关闭VScode后直接安装。检查各种工具的版本。我的VS代码需要升级。打开后会自动更新。更新后,重启VScode。其他工具的更新也可以参考官方文档,很全面。官网文档说支持linux编译,我有点疑惑。看看这份文件。下载源码,用bandizip解压一堆报错,在PowerShell中换成tar解压。tar-zxvfcode-2.0-canary.tar.gz这是完整代码,解压花了十多分钟。InstallMinGW勾选这2个,其实就是勾选最下面的那个吧?在VScode2中设置工具链,编译打开源码,编译成功。花了90年代。如果想加快速度,最好使用服务器来编译。3.烧写修改applications\sample\wifi-iot\app\BUILD.gnlite_component("app"){features=[#"startup","iothardware:led_example"]}编译Leddemo参考官网,设置端口:烧录成功。4.打开项目报错[2021/6/265:46:22pm]无法使用compilerPath"riscv32-unknown-elf-gcc"解析配置。请改用“D:\tool\Strawberry\c\bin\gcc.exe”。1.1.找不到“D:\HarmonyDev\code-2.0-canary\include”。找不到“D:\HarmonyDev\code-2.0-canary\src”。找不到“riscv32-unknown-elf-gcc”。不管编译错误[OHOSERROR][151/303]COPY../../../foundation/distributedschedule/samgr_lite/config/system_capability.jsonobj/foundation/distributedschedule/samgr_lite/config/system_capability.json[OHOSERROR]FAILED:obj/foundation/distributedschedule/samgr_lite/config/system_capability.json[OHOSERROR]pythonD:/HarmonyDev/code-2.0-canary//build/lite/copy_files.py--src_type=file--src=../../../foundation/distributedschedule/samgr_lite/config/system_capability.json--dest_dir=obj/foundation/distributedschedule/samgr_lite/config/system_capability.json[OHOSERROR]FatalPythonerror:init_sys_streams:can'initializesysstandardstreams[OHOSERROR]centreback(mostre)[OHOSERROR]文件“C:\Users\qweto\AppData\Local\Programs\Python\Python38\lib\io.py”,第54行,在
