{
  "id": "flutter/android-signing-key-created-with-incorrect-alias",
  "signature": "Gradle task assembleRelease failed with exit code 1: Execution failed for task ':app:signReleaseBundle' > Key was created with a different alias than the one used",
  "signature_zh": "Gradle任务assembleRelease失败，退出代码1：任务':app:signReleaseBundle'执行失败 > 密钥是用与所用别名不同的别名创建的",
  "regex": "Gradle task assembleRelease failed with exit code 1: Execution failed for task ':app:signReleaseBundle' > Key was created with a different alias",
  "domain": "flutter",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "The keystore file contains a key with an alias that does not match the alias specified in the signing configuration in `build.gradle`, often due to using a different keystore or regenerating keys.",
  "root_cause_type": "generic",
  "root_cause_zh": "密钥库文件包含一个别名与`build.gradle`中签名配置指定的别名不匹配的密钥，通常是由于使用了不同的密钥库或重新生成了密钥。",
  "versions": [
    {
      "version": "Flutter 3.13.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Flutter 3.19.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Flutter 3.22.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This invalidates the old signing key, which may cause issues with app updates on the Play Store.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This will still not match the actual alias in the keystore; the alias must match exactly.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This bypasses the error but uses a debug key for release, which is insecure and not allowed for Play Store upload.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "List aliases in the keystore using `keytool -list -keystore your-keystore.jks -storepass your-storepass` and update the `keyAlias` in `android/app/build.gradle` to match.",
      "success_rate": 0.95,
      "how": "List aliases in the keystore using `keytool -list -keystore your-keystore.jks -storepass your-storepass` and update the `keyAlias` in `android/app/build.gradle` to match.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the alias is correct, ensure the keystore path and passwords are correct in `key.properties` and `build.gradle`.",
      "success_rate": 0.85,
      "how": "If the alias is correct, ensure the keystore path and passwords are correct in `key.properties` and `build.gradle`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Recreate the keystore with the exact alias specified: `keytool -genkey -v -keystore release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias your-alias`.",
      "success_rate": 0.8,
      "how": "Recreate the keystore with the exact alias specified: `keytool -genkey -v -keystore release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias your-alias`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "List aliases in the keystore using `keytool -list -keystore your-keystore.jks -storepass your-storepass` and update the `keyAlias` in `android/app/build.gradle` to match.",
    "If the alias is correct, ensure the keystore path and passwords are correct in `key.properties` and `build.gradle`.",
    "Recreate the keystore with the exact alias specified: `keytool -genkey -v -keystore release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias your-alias`."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.flutter.dev/deployment/android#signing-the-app",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2025-01-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}