{
  "id": "android/layout-inflate-error-constraintlayout",
  "signature": "android.view.InflateException: Binary XML file line #XX: Binary XML file line #XX: Error inflating class androidx.constraintlayout.widget.ConstraintLayout",
  "signature_zh": "android.view.InflateException: 二进制XML文件第#XX行：膨胀类androidx.constraintlayout.widget.ConstraintLayout时出错",
  "regex": "android\\.view\\.InflateException.*Error inflating class androidx\\.constraintlayout\\.widget\\.ConstraintLayout",
  "domain": "android",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "ConstraintLayout version mismatch or missing dependency in build.gradle, causing layout inflation failure at runtime.",
  "root_cause_type": "generic",
  "root_cause_zh": "ConstraintLayout版本不匹配或build.gradle中缺少依赖项，导致运行时布局膨胀失败。",
  "versions": [
    {
      "version": "ConstraintLayout 2.1.4",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Android Gradle Plugin 8.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "AndroidX AppCompat 1.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Adding ConstraintLayout dependency without specifying version, relying on transitive dependency from AppCompat",
      "why_fails": "Transitive version may be outdated or incompatible with other libraries; explicit version needed.",
      "fail_rate": 0.65,
      "condition": "",
      "sources": []
    },
    {
      "action": "Cleaning project and rebuilding without updating dependencies",
      "why_fails": "Does not address version mismatch; if dependencies are stale, rebuild repeats same error.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add explicit ConstraintLayout dependency in build.gradle: implementation 'androidx.constraintlayout:constraintlayout:2.1.4' and ensure all AndroidX libraries are on same version.",
      "success_rate": 0.85,
      "how": "Add explicit ConstraintLayout dependency in build.gradle: implementation 'androidx.constraintlayout:constraintlayout:2.1.4' and ensure all AndroidX libraries are on same version.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Downgrade ConstraintLayout to 2.1.3 if using older AGP version, or upgrade AGP to 8.1.0 for compatibility.",
      "success_rate": 0.8,
      "how": "Downgrade ConstraintLayout to 2.1.3 if using older AGP version, or upgrade AGP to 8.1.0 for compatibility.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Add explicit ConstraintLayout dependency in build.gradle: implementation 'androidx.constraintlayout:constraintlayout:2.1.4' and ensure all AndroidX libraries are on same version.",
    "Downgrade ConstraintLayout to 2.1.3 if using older AGP version, or upgrade AGP to 8.1.0 for compatibility."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.android.com/reference/androidx/constraintlayout/widget/ConstraintLayout",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2023-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}