【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...

相关推荐
摘星编程1 天前
React Native鸿蒙:Loading加载动画效果
react native·react.js·harmonyos
Swift社区1 天前
HarmonyOS 页面路由与导航开发
华为·harmonyos
希望上岸的大菠萝1 天前
HarmonyOS 6.0 开发环境搭建完全指南 - DevEco Studio 配置 + 真机调试实战
华为·harmonyos
大雷神1 天前
HarmonyOS智慧农业管理应用开发教程--高高种地--第28篇:用户中心与个人资料
华为·harmonyos
雨季6661 天前
破界与共生:HarmonyOS原生应用生态全景图谱与PC时代三重变局
flutter·华为·harmonyos
一路阳光8511 天前
华为mate80现在确实没有日日新了,看来华为是对鸿蒙6有信心了
华为·harmonyos
三掌柜6661 天前
如何从一个开发者成为鸿蒙KOL
华为·harmonyos
哈基米~南北绿豆1 天前
虚拟机体验:在Windows/Mac上运行鸿蒙PC开发环境
windows·macos·harmonyos
爱笑的眼睛111 天前
学着学着 我就给这个 HarmonyOS 应用增加了些新技术
华为·ai·harmonyos
花花_11 天前
HarmonyOS开发:字符串全栈实战手册
harmonyos·鸿蒙领航者计划