{
  "id": "java/gradle-missing-build-script-cache",
  "signature": "Build script '/home/user/project/build.gradle' could not be loaded: Could not open cache directory '/home/user/.gradle/caches/8.5/build-cache-1' (Permission denied)",
  "signature_zh": "无法加载构建脚本 '/home/user/project/build.gradle'：无法打开缓存目录 '/home/user/.gradle/caches/8.5/build-cache-1'（权限被拒绝）。",
  "regex": "Build\\ script\\ '/home/user/project/build\\.gradle'\\ could\\ not\\ be\\ loaded:\\ Could\\ not\\ open\\ cache\\ directory\\ '/home/user/\\.gradle/caches/8\\.5/build\\-cache\\-1'\\ \\(Permission\\ denied\\)",
  "domain": "java",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "The Gradle cache directory is owned by another user or has incorrect permissions, preventing Gradle from writing to it.",
  "root_cause_type": "generic",
  "root_cause_zh": "Gradle 缓存目录由其他用户拥有或权限不正确，阻止 Gradle 写入。",
  "versions": [
    {
      "version": "8+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Changing the cache directory to a different path without fixing permissions",
      "why_fails": "The new path may also have permission issues or be non-existent.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Running Gradle with sudo",
      "why_fails": "This can cause ownership issues and is a security risk.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Fix permissions on the cache directory",
      "success_rate": 0.95,
      "how": "sudo chown -R $USER:$USER ~/.gradle/caches/8.5/build-cache-1",
      "condition": "",
      "sources": []
    },
    {
      "action": "Clear the cache directory and let Gradle recreate it",
      "success_rate": 0.9,
      "how": "rm -rf ~/.gradle/caches/8.5/build-cache-1",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-08-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}