{
  "id": "android/layout-inflater-crash-bad-parameter",
  "signature": "android.view.InflateException: Binary XML file line #XX: Error inflating class <unknown>",
  "signature_zh": "android.view.InflateException: Binary XML file line #XX: 错误膨胀类 <unknown>",
  "regex": "android\\.view\\.InflateException: Binary XML file line #\\d+: Error inflating class",
  "domain": "android",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A layout XML file contains an invalid attribute, missing custom view, or incompatible resource reference that prevents inflation.",
  "root_cause_type": "generic",
  "root_cause_zh": "布局 XML 文件包含无效属性、缺少自定义视图或不兼容的资源引用，导致无法膨胀。",
  "versions": [
    {
      "version": "Android 10 (API 29)",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Android 11 (API 30)",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Android 12 (API 31)",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Android 13 (API 33)",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The error is in the code, not runtime cache; clearing cache doesn't fix invalid XML.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Reinstallation doesn't change the source code; the same invalid XML will be inflated again.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Inspect the layout XML file at the line number indicated in the error. Look for typos in attribute names, missing namespace declarations (e.g., xmlns:app), or incorrect custom view class names. Example: replace 'android:backgroundTint' with 'app:backgroundTint' if using appcompat.",
      "success_rate": 0.9,
      "how": "Inspect the layout XML file at the line number indicated in the error. Look for typos in attribute names, missing namespace declarations (e.g., xmlns:app), or incorrect custom view class names. Example: replace 'android:backgroundTint' with 'app:backgroundTint' if using appcompat.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure all custom views are properly declared in the XML with their fully qualified class name (e.g., com.example.MyCustomView instead of MyCustomView).",
      "success_rate": 0.85,
      "how": "Ensure all custom views are properly declared in the XML with their fully qualified class name (e.g., com.example.MyCustomView instead of MyCustomView).",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using a custom view from a library, verify the library is added as a dependency in build.gradle and the view is not conditionally loaded.",
      "success_rate": 0.8,
      "how": "If using a custom view from a library, verify the library is added as a dependency in build.gradle and the view is not conditionally loaded.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "检查错误指示行号的布局 XML 文件，查找属性名称拼写错误、缺少命名空间声明（如 xmlns:app）或不正确的自定义视图类名。例如：如果使用 appcompat，将 'android:backgroundTint' 替换为 'app:backgroundTint'。",
    "确保所有自定义视图在 XML 中使用完整限定类名声明（例如 com.example.MyCustomView 而不是 MyCustomView）。",
    "如果使用了库中的自定义视图，请验证该库是否已作为依赖项添加到 build.gradle 中，并且该视图不是条件加载的。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.android.com/reference/android/view/InflateException",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}