HarmonyOS鸿蒙Next中写的页面烧不进模拟机,请教下各位

HarmonyOS鸿蒙Next中写的页面烧不进模拟机,请教下各位

1.png

D:\academic\competition\harmony\nodejs\node.exe C:\Users\11.hvigor\project_caches\98f2a3de506607d4e30d76a1496be781\workspace\node_modules@ohos\hvigor\bin\hvigor.js --mode module -p module=entry@default -p product=default -p debuggable=true assembleHap


hvigor UP-TO-DATE :entry:default@PreBuild… hvigor UP-TO-DATE :entry:default@GenerateMetadata… hvigor UP-TO-DATE :entry:default@MergeProfile… hvigor Finished :entry:default@BuildNativeWithCmake… after 1 ms hvigor UP-TO-DATE :entry:default@GenerateLoaderJson… hvigor UP-TO-DATE :entry:default@MakePackInfo… hvigor UP-TO-DATE :entry:default@ProcessProfile… hvigor Finished :entry:default@BuildNativeWithNinja… after 1 ms hvigor UP-TO-DATE :entry:default@ProcessResource… hvigor UP-TO-DATE :entry:default@ProcessLibs… hvigor ERROR: Failed :entry:default@CompileResource… hvigor ERROR: Tools execution failed. Error: ref ‘$color:white’ don’t be defined. Detail: Please check the message from tools. hvigor ERROR: BUILD FAILED in 153 ms Process finished with exit code -1


更多关于HarmonyOS鸿蒙Next中写的页面烧不进模拟机,请教下各位的实战教程也可以访问 https://www.itying.com/category-93-b0.html

2 回复
Error: ref '$color:white' don't be defined. 这里提示$color:white没有定义呀。

你是不是在哪里拷贝的配置文件module.json5到下图那的color.json,white把添加进去就可以了

![图片](https://alliance-communityfile-drcn.dbankcdn.com/FileServer/getFile/cmtybbs/790/236/365/0030086000790236365.20250501220602.32347676104176341263439032393311:50001231000000:2800:62404E9AE9DBA2A3E0B2DD4CABDA4C9E16052CA1C78CCF298168F15E13BE7C77.png)

更多关于HarmonyOS鸿蒙Next中写的页面烧不进模拟机,请教下各位的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


在HarmonyOS鸿蒙Next中,页面无法烧录到模拟机可能是由于以下原因:

  1. 环境配置问题:确保开发环境(如DevEco Studio)和SDK版本正确配置,且与模拟机兼容。
  2. 模拟机状态:检查模拟机是否正常启动,网络连接是否稳定。
  3. 项目配置:确认项目的config.json文件配置正确,特别是页面路径和入口设置。
  4. 编译问题:清理并重新编译项目,确保没有编译错误。
  5. 日志排查:查看DevEco Studio的日志输出,定位具体错误信息。

建议逐步排查以上问题,确保环境、配置和代码无误。

回到顶部