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

相关推荐
xianjixiance_1 天前
Flutter跨平台UUID生成工具uuid_test鸿蒙化使用指南
flutter·elasticsearch·harmonyos
前端世界1 天前
别只测功能:一套可落地的鸿蒙分布式压力测试方案
分布式·压力测试·harmonyos
TAEHENGV1 天前
提醒列表模块 Cordova 与 OpenHarmony 混合开发实战
android·java·harmonyos
少一倍的优雅1 天前
hi3863 (ws63) 智能小车 (二)信息交互
单片机·嵌入式硬件·交互·harmonyos·hi3863
个案命题1 天前
鸿蒙生态的“完美无瑕”与“吹毛求疵”
华为·harmonyos
前端世界1 天前
鸿蒙语音控制实战:从语音识别到业务执行的完整链路
华为·语音识别·harmonyos
90后的晨仔1 天前
鸿蒙ArkUI如何使用RGB、十六进制等设置颜色值?
harmonyos
音浪豆豆_Rachel2 天前
Flutter鸿蒙化之深入解析Pigeon多参数接口设计:multiple_arity.dart全解
flutter·harmonyos
音浪豆豆_Rachel2 天前
Flutter鸿蒙文件选择器深度解析:文本文件处理与跨平台挑战
flutter·harmonyos
奔跑的露西ly2 天前
【HarmonyOS NEXT】沉浸式页面实现
华为·harmonyos