{
  "id": "android/navigation-destination-not-found",
  "signature": "IllegalArgumentException: navigation destination com.example:id/destHome is not found in NavController",
  "signature_zh": "IllegalArgumentException：在 NavController 中未找到导航目的地 com.example:id/destHome",
  "regex": "IllegalArgumentException: navigation destination .+ is not found in NavController",
  "domain": "android",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The navigation action references a destination ID that is not declared in the associated NavGraph, often due to a missing fragment or a typo in the navigation XML.",
  "root_cause_type": "generic",
  "root_cause_zh": "导航操作引用了未在关联的 NavGraph 中声明的目的地 ID，通常是由于缺少片段或导航 XML 中的拼写错误。",
  "versions": [
    {
      "version": "AndroidX Navigation 2.5.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "AndroidX Navigation 2.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The destination ID might be misspelled or not present in the current NavGraph, causing the same error.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Each NavController uses a specific NavGraph; adding to the wrong file doesn't resolve the reference.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error is a code configuration issue, not a cached state issue.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure the destination ID is declared in the correct NavGraph file (e.g., nav_graph.xml) and that the action's destination attribute matches exactly. Example: <fragment android:id=\"@+id/destHome\" android:name=\"com.example.HomeFragment\" />",
      "success_rate": 0.85,
      "how": "Ensure the destination ID is declared in the correct NavGraph file (e.g., nav_graph.xml) and that the action's destination attribute matches exactly. Example: <fragment android:id=\"@+id/destHome\" android:name=\"com.example.HomeFragment\" />",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use Safe Args to generate type-safe navigation actions. Add the Safe Args plugin to build.gradle and replace manual navigate calls with generated Directions classes.",
      "success_rate": 0.9,
      "how": "Use Safe Args to generate type-safe navigation actions. Add the Safe Args plugin to build.gradle and replace manual navigate calls with generated Directions classes.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Verify that the NavController is initialized with the correct NavGraph by calling navController.setGraph(R.navigation.nav_graph) before navigating.",
      "success_rate": 0.8,
      "how": "Verify that the NavController is initialized with the correct NavGraph by calling navController.setGraph(R.navigation.nav_graph) before navigating.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "确保目的地 ID 在正确的 NavGraph 文件中声明（例如 nav_graph.xml），并且操作的 destination 属性完全匹配。示例：<fragment android:id=\"@+id/destHome\" android:name=\"com.example.HomeFragment\" />",
    "使用 Safe Args 生成类型安全的导航操作。在 build.gradle 中添加 Safe Args 插件，并用生成的 Directions 类替换手动 navigate 调用。",
    "通过调用 navController.setGraph(R.navigation.nav_graph) 在导航前验证 NavController 已使用正确的 NavGraph 初始化。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.android.com/guide/navigation/navigation-navigate",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-05-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}