harmonyOs开发,报 “when the corresponding visual file exists, the build function of the entry component错误

rhymo 鸿蒙开发评论阅读模式

harmonyOs应用开发,报 “when the corresponding visual file exists, the build function of the entry component must be empty.

这是因为:

您创建工程时勾选“Enable Super Visual”(如下图),检查您的工程中是否存在“entry\src\main\supervisual”目录,若存在表示您的工程为低码工程,(即你确实是勾选了),低码工程开发时您可在“supervisual\MainAbility\pages\index.visual”中进行您的首页开发,组件可直接使用拖拽方式;进行低码工程开发时,那么您对应的index.ets文件入口组件的构建函数必须为空。
解决方法:
【腾讯文档】harmonyOs开发,报 “when the corresponding visual file exists, the build function of the entry component错误

文章末尾固定信息

weinxin
artcgdesign
我的微信公众号
微信扫一扫
rhymo
  • 本文由 发表于 2024年4月3日 09:29:28
  • 转载请务必保留本文链接:https://rhymo.cn/53.html
  • 报错
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定