【HarmonyOS 6】 The target can not be empty. check the build.profile,json5 file of

一、问题背景

The target can not be empty. check the build-profile.json5 file of the project root directory andmake sure the targets afe modules in configuraton is set lo specifed product: default in applyToProducts

目标不能为空。 检查项目根目录的build-profile.json5文件,并确保配置中的目标afe模块设置为指定的产品:applyToProducts中的默认值

二、解决方案

在工程级build-profile.json5->modules[]->targets[]->applyToProducts中需要有default默认值

typescript 复制代码
"targets": [
  {
    "name": "default",
    "applyToProducts": [
      "default",
      "Community",
      "Ultimate"
    ]
  },
  {
    "name": "free",
    "applyToProducts": [
      "default",
      "Community"
    ]
  },
  {
    "name": "vip",
    "applyToProducts": [
      "default",
      "Ultimate"
    ]
  }
]

applyToProducts实际上用于配置多目标产物,详情参见:developer.huawei.com/consumer/cn...

相关推荐
╰つ栺尖篴夢ゞ3 小时前
HarmonyOS之多态样式stateStyles的使用
华为·harmonyos·statestyles·多态样式
lqj_本人10 小时前
鸿蒙Cordova插件架构与OnsenUI组件适配机制深度解析
华为·架构·harmonyos
猫林老师13 小时前
Flutter for HarmonyOS开发指南(六):测试、调试与质量保障体系
flutter·华为·harmonyos
爱笑的眼睛1118 小时前
HarmonyOS 应用开发中的内存泄漏检测与修复:深入探索与实践指南
华为·harmonyos
kangyouwei19 小时前
鸿蒙开发:19-本地开发配置bash环境执行hvigorw命令
前端·harmonyos
爱笑的眼睛1119 小时前
HarmonyOS 应用开发:系统权限申请与管理深度解析
华为·harmonyos
熊猫钓鱼>_>1 天前
鸿蒙ArkUI基础组件开发详解
华为·harmonyos
猫林老师1 天前
Flutter for HarmonyOS开发指南(八):国际化与本地化深度实践
flutter·华为·harmonyos
夏文强1 天前
HarmonyOS开发-ArkWeb开发指导
华为·harmonyos
Georgewu1 天前
【HarmonyOS 6】SpeechKit中的朗读控件,初始化前不进行窗口舞台的设置,也不会报错,与文档描述不符。
harmonyos