编译报错“Duplicated files found in module entry. This may cause unexpected errors at runtime”
=========================================================================================

**问题现象**

编译构建时，报错“Duplicated files found in module entry. This may cause unexpected errors at runtime”。

![](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_scene_100_1/c2/v3/fdb0AmtUTq-qUfgLTfy7OQ/zh-cn_image_0000002654837855.png?HW-CC-KV=V1&HW-CC-Date=20260709T134355Z&HW-CC-Expire=86400&HW-CC-Sign=8BEA82A9D6DCEB67E9007F12039D6F7FB15792B8BC0A6B046C53E302796549FB "点击放大")

**解决措施**

该报错是从不同的包中收集到了相同名称的so包，导致so包冲突，可在模块级build-profile.json5文件中添加enableOverride字段并设置true。更多内容可参考[模块级build-profile.json5文件](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/ide-hvigor-build-profile)。

"buildOption": {
  "nativeLib": {
    "filter": {
      "enableOverride": true
    }
  }
},