【关键字】
编译构建 / 配置APP多目标构建产物 / deviceType不唯一
【问题描述】
在DevEco Studio中设置product配置,实际不生效,如何解决?
应用的工程为一个Entry模块。
根目录的build-profile配置了default project中支持两个target, 根目录build-profile的配置项如下:
"modules": [
{
"name": "entry",
"srcPath": "./entry",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
},
{
"name": "free",
//将free target打包到productA APP中
"applyToProducts": [
"default",
]
},
]
}
Entry模块配置下的build-profile
"targets": [
{
"name": "default",
"runtimeOS": "HarmonyOS",
"output": {
"artifactName": "defaultTarget" //产物名称为customizedTargetOutputName
},
"config": {
"deviceType": [ //定义free支持的设备类型为phone
"tablet"
]

1万+

被折叠的 条评论
为什么被折叠?



