# IL2CPP 错误: BadImageFormatException: 无法解析字段令牌 0x04000001

- **ID:** `unity/il2cpp-bad-image-format`
- **领域:** unity
- **类别:** build_error
- **错误码:** `0x04000001`
- **验证级别:** ai_generated
- **修复率:** 87%

## 根因

托管程序集包含对编译 IL 中不存在的字段的引用，通常是由于部分重新编译或程序集版本不匹配。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Unity 2022.3 | active | — | — |
| Unity 2023.2 | active | — | — |
| Unity 6000.0 | active | — | — |

## 解决方案

1. ```
   Perform a full rebuild: delete the Library and Temp folders, then recompile the project from scratch.
   ```
2. ```
   Ensure all custom DLLs are compiled with the same .NET version and API compatibility level as the project.
   ```

## 无效尝试

- **** — The issue is in the managed assemblies, not in generated data; a full rebuild is needed. (50% 失败率)
- **** — Code stripping removes unused code but does not affect broken metadata references. (80% 失败率)
