# 任务 ':app:lintVitalRelease' 执行失败。> Lint 在组装发布目标时发现致命错误。正在中止。

- **ID:** `android/lint-gradle-plugin-api-mismatch`
- **领域:** android
- **类别:** build_error
- **验证级别:** ai_generated
- **修复率:** 88%

## 根因

Android Lint 配置为将警告视为错误，并且一个或多个 lint 检查在发布构建中失败。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| AGP 8.2.2 | active | — | — |
| Gradle 8.5 | active | — | — |
| Lint 31.2.0 | active | — | — |

## 解决方案

1. ```
   Run ./gradlew :app:lintVitalRelease to see detailed lint report. Fix each issue: e.g., remove unused permissions, fix missing translations. Then rebuild.
   ```
2. ```
   Configure lintOptions to suppress specific checks: lintOptions { disable 'UnusedResources', 'MissingTranslation' } in build.gradle. Rebuild.
   ```

## 无效尝试

- **Disable all lint checks by setting lintOptions.abortOnError false** — Hides real issues; release build may still produce broken APK or violate Play Store policies. (70% 失败率)
- **Ignore lint by running assembleRelease with --exclude-task lintVitalRelease** — Skipping lint entirely bypasses critical checks; can lead to security issues or crashes in production. (80% 失败率)
