{
  "id": "flutter/gradle-ndk-version-mismatch",
  "signature": "Gradle task assembleDebug failed with exit code 1: NDK version mismatch. Expected (23.1.7779620) but found (25.2.9519653)",
  "signature_zh": "Gradle 任务 assembleDebug 失败，退出码 1：NDK 版本不匹配。期望 (23.1.7779620) 但发现 (25.2.9519653)",
  "regex": "NDK version mismatch\\. Expected \\(\\d+\\.\\d+\\.\\d+\\) but found \\(\\d+\\.\\d+\\.\\d+\\)",
  "domain": "flutter",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "The Android NDK version installed on the system does not match the version required by the Flutter project's native dependencies, causing compilation failures.",
  "root_cause_type": "generic",
  "root_cause_zh": "系统上安装的 Android NDK 版本与 Flutter 项目原生依赖所需的版本不匹配，导致编译失败。",
  "versions": [
    {
      "version": "Flutter 3.22.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Android Gradle Plugin 8.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "NDK 23.1.7779620",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Delete the entire .gradle directory and rebuild.",
      "why_fails": "Deleting .gradle only clears caches; the NDK version mismatch is a system-level configuration issue.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Set the NDK version in local.properties by force to the system version without adjusting dependencies.",
      "why_fails": "Forcing a different NDK version can break native library compilation if the C++ code relies on specific API levels.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Install the required NDK version via Android Studio SDK Manager or command line: sdkmanager 'ndk;23.1.7779620'. Then update android/gradle.properties: android.ndkVersion=23.1.7779620",
      "success_rate": 0.85,
      "how": "Install the required NDK version via Android Studio SDK Manager or command line: sdkmanager 'ndk;23.1.7779620'. Then update android/gradle.properties: android.ndkVersion=23.1.7779620",
      "condition": "",
      "sources": []
    },
    {
      "action": "If you cannot install the exact version, modify the project's build.gradle to use the system NDK version and update any native dependencies that require the specific version. Example: ndkVersion = '25.2.9519653' in android/app/build.gradle, then test compatibility.",
      "success_rate": 0.75,
      "how": "If you cannot install the exact version, modify the project's build.gradle to use the system NDK version and update any native dependencies that require the specific version. Example: ndkVersion = '25.2.9519653' in android/app/build.gradle, then test compatibility.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use 'flutter config --android-ndk /path/to/correct/ndk' to point Flutter to a compatible NDK installation.",
      "success_rate": 0.8,
      "how": "Use 'flutter config --android-ndk /path/to/correct/ndk' to point Flutter to a compatible NDK installation.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Install the required NDK version via Android Studio SDK Manager or command line: sdkmanager 'ndk;23.1.7779620'. Then update android/gradle.properties: android.ndkVersion=23.1.7779620",
    "If you cannot install the exact version, modify the project's build.gradle to use the system NDK version and update any native dependencies that require the specific version. Example: ndkVersion = '25.2.9519653' in android/app/build.gradle, then test compatibility.",
    "Use 'flutter config --android-ndk /path/to/correct/ndk' to point Flutter to a compatible NDK installation."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.android.com/ndk/downloads",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}