{
  "id": "flutter/signing-key-creation-error",
  "signature": "Gradle task assembleRelease failed with exit code 1: Execution failed for task ':app:signReleaseBundle' > Key was created with errors: Key was created with errors: Invalid keystore format",
  "signature_zh": "Gradle 任务 assembleRelease 失败，退出码 1：任务 ':app:signReleaseBundle' 执行失败 > 创建密钥时出错：密钥库格式无效",
  "regex": "Key was created with errors: Invalid keystore format",
  "domain": "flutter",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "The keystore file used for signing the release bundle is corrupted, in an unsupported format, or was created with a different Java version than the current build environment.",
  "root_cause_type": "generic",
  "root_cause_zh": "用于签署发布包的密钥库文件已损坏、格式不受支持，或使用与当前构建环境不同的 Java 版本创建。",
  "versions": [
    {
      "version": "Flutter 3.16+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Gradle 8.3+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Android Studio Iguana 2023.2.1+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Converting the keystore to PKCS12 format using keytool without specifying the correct alias often results in missing key entries and signature failures.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Deleting the keystore and creating a new one without backing up the original causes loss of the signing key, preventing app updates on the same package name.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Copying the keystore from another project without changing the key alias may cause signature conflicts with Google Play Store.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Regenerate the keystore using Java 11 or newer: keytool -genkey -v -keystore release.keystore -alias my-key -keyalg RSA -keysize 2048 -validity 10000 -storetype JKS. Then update android/key.properties with the new file path.",
      "success_rate": 0.85,
      "how": "Regenerate the keystore using Java 11 or newer: keytool -genkey -v -keystore release.keystore -alias my-key -keyalg RSA -keysize 2048 -validity 10000 -storetype JKS. Then update android/key.properties with the new file path.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Convert the existing keystore to PKCS12 format: keytool -importkeystore -srckeystore old.keystore -destkeystore new.keystore -deststoretype pkcs12. Then reference the new file in key.properties.",
      "success_rate": 0.8,
      "how": "Convert the existing keystore to PKCS12 format: keytool -importkeystore -srckeystore old.keystore -destkeystore new.keystore -deststoretype pkcs12. Then reference the new file in key.properties.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using Android Studio, create a new keystore via Build > Generate Signed Bundle/APK > Create new. Ensure Java version in File > Project Structure > SDK Location matches the keystore creation version.",
      "success_rate": 0.9,
      "how": "If using Android Studio, create a new keystore via Build > Generate Signed Bundle/APK > Create new. Ensure Java version in File > Project Structure > SDK Location matches the keystore creation version.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用 Java 11 或更高版本重新生成密钥库：keytool -genkey -v -keystore release.keystore -alias my-key -keyalg RSA -keysize 2048 -validity 10000 -storetype JKS。然后更新 android/key.properties 中的文件路径。",
    "将现有密钥库转换为 PKCS12 格式：keytool -importkeystore -srckeystore old.keystore -destkeystore new.keystore -deststoretype pkcs12。然后在 key.properties 中引用新文件。",
    "如果使用 Android Studio，通过 Build > Generate Signed Bundle/APK > Create new 创建新密钥库。确保 File > Project Structure > SDK Location 中的 Java 版本与密钥库创建版本匹配。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.android.com/studio/publish/app-signing",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-02-14",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}