鸿蒙开发:ConfigJsonError: LABEL_VALUE_ERROR > Cause: Please check module:[entry] config.json file, check

        至鸿蒙发布以来,一直想试试,于是我今天就是试了。在简单阅读完开发文档之后,开始网上找大佬们写的控件,运行爽爽手,再于是,处理了我人生中第一个鸿蒙问题。新手小白,作此记录。

ConfigJsonError: LABEL_VALUE_ERROR
     > Cause: Please check module:[entry] config.json file, check whether the label:[abilities] sub-tag label:[label]  is the correct resource reference.
     > File: F:\Harmony\boom-menu-master\boom-menu-master\entry\src\main\config.json:256
     > Solution: See support website for more help!

根据DevEco Studio的提示:核对config.json中的 label标签。定位256行

 点击鸿蒙官网相关方案,可以看到属于失配历史工程问题(我安装 的是HUAWEI DevEco Studio3.0Beta版,运行的项目为2.1.1

 于是我在label后面加上$string: ,依然报错

 我查看了string.json文件,相关的信息如下

{
      "name": "tool_bar_example",
      "value": "ToolBar Example"
    }

发现并没有定义ToolBar

采用资源引用方式修改label值为:$string:tool_bar_example

 运行程序,

 

 成功

猜你喜欢

转载自blog.csdn.net/qq_30336973/article/details/122280079