# 清单合并失败：AndroidManifest.xml:2:5-36 中的属性 application@icon 值=(@mipmap/ic_launcher) 也出现在 AndroidManifest.xml:8:5-41

- **ID:** `android/manifest-merger-failed-attribute-applicationicon`
- **领域:** android
- **类别:** build_error
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

同一属性（例如 android:icon）在多个合并的清单文件中定义且值冲突，导致合并冲突。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| AGP 7.0+ | active | — | — |
| Android Studio 2022.1+ | active | — | — |

## 解决方案

1. ```
   在主清单的 <application> 标签中添加 tools:replace="android:icon" 以覆盖库的值
   ```
2. ```
   使用 tools:node="merge" 配合 tools:replace 处理多个冲突属性
   ```
3. ```
   添加 tools:remove 以排除来自库清单的冲突属性
   ```

## 无效尝试

- **** — Removing may cause missing icon if it's required; better to use tools:replace to override. (40% 失败率)
- **** — If the manifests come from libraries, you may not have direct control over them. (50% 失败率)
- **** — tools:remove deletes the attribute entirely, which may not be desired. (60% 失败率)
