# Gradle 任务 assembleDebug 失败，退出码 1：任务 ':app:compileFlutterBuildDebugArm64' 执行失败

- **ID:** `flutter/gradle-execution-failed-for-task-compiledartkernel`
- **领域:** flutter
- **类别:** build_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

Gradle 构建期间 Flutter Dart 编译步骤失败，原因包括缓存损坏、Dart SDK 版本不兼容或目标架构（arm64）缺少原生依赖。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Flutter 3.16 | active | — | — |
| Flutter 3.19 | active | — | — |
| Gradle 8.0 | active | — | — |
| Gradle 8.2 | active | — | — |

## 解决方案

1. ```
   Run 'flutter clean' followed by 'flutter pub get' and 'cd android && ./gradlew clean' to clear all caches, then rebuild.
   ```
2. ```
   Check the full error log for specific Dart compilation errors (e.g., syntax errors, missing imports) and fix them; also ensure the Dart SDK version matches the project constraints in pubspec.yaml.
   ```

## 无效尝试

- **** — The Gradle cache or Dart kernel snapshots may still be corrupted; a full clean is often needed. (65% 失败率)
- **** — May introduce breaking changes or dependency conflicts that cause other build failures. (70% 失败率)
- **** — If the error is due to code issues or cache corruption, more memory won't help. (80% 失败率)
