{
  "id": "android/navigation-compose-illegalargumentexception",
  "signature": "java.lang.IllegalArgumentException: navigation destination com.example:id/destination1 is not a valid NavDestination for action com.example:id/action_to_destination2",
  "signature_zh": "java.lang.IllegalArgumentException: 导航目标com.example:id/destination1不是动作com.example:id/action_to_destination2的有效NavDestination",
  "regex": "java\\.lang\\.IllegalArgumentException.*navigation destination.*is not a valid NavDestination",
  "domain": "android",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Navigation graph misconfiguration: action references a destination not defined in the same navigation graph or route mismatch.",
  "root_cause_type": "generic",
  "root_cause_zh": "导航图配置错误：动作引用的目标未在同一导航图中定义或路由不匹配。",
  "versions": [
    {
      "version": "Navigation Compose 2.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "AndroidX Activity 1.7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Kotlin 1.9.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Removing and re-adding the navigation graph resource file without checking IDs",
      "why_fails": "ID references may still be stale; requires verifying each action-destination mapping in the XML.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Hardcoding route strings instead of using generated NavDirections",
      "why_fails": "Bypasses type safety but still fails if route strings don't match graph; also breaks navigation arguments.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "In NavHost composable, ensure all destinations are added: composable(\"destination1\") { ... }. Then navigate using named routes: navController.navigate(\"destination2\") instead of action IDs.",
      "success_rate": 0.9,
      "how": "In NavHost composable, ensure all destinations are added: composable(\"destination1\") { ... }. Then navigate using named routes: navController.navigate(\"destination2\") instead of action IDs.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Regenerate navigation graph using Android Studio's Navigation Editor: right-click res/navigation/*.xml -> Open with Editor -> validate all actions and destinations.",
      "success_rate": 0.85,
      "how": "Regenerate navigation graph using Android Studio's Navigation Editor: right-click res/navigation/*.xml -> Open with Editor -> validate all actions and destinations.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "In NavHost composable, ensure all destinations are added: composable(\"destination1\") { ... }. Then navigate using named routes: navController.navigate(\"destination2\") instead of action IDs.",
    "Regenerate navigation graph using Android Studio's Navigation Editor: right-click res/navigation/*.xml -> Open with Editor -> validate all actions and destinations."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.android.com/guide/navigation/navigation-getting-started",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-08-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}