# Gradle task assembleRelease failed with exit code 1: Execution failed for task ':app:signReleaseBundle' > Key was created with a different algorithm (RSA) than expected (EC)

- **ID:** `flutter/gradle-sign-release-key-created`
- **Domain:** flutter
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The signing key used for the release bundle was created with RSA algorithm but the Gradle configuration expects an EC (Elliptic Curve) key, or vice versa, due to a mismatch between the key type and the key store configuration.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Flutter 3.13.0 | active | — | — |
| Android Gradle Plugin 8.0 | active | — | — |
| Android Gradle Plugin 8.2 | active | — | — |

## Workarounds

1. **Update the signing configuration in android/app/build.gradle to specify the correct key algorithm that matches the key store's key, e.g., keyAlgorithm 'RSA' or 'EC'.** (90% success)
   ```
   Update the signing configuration in android/app/build.gradle to specify the correct key algorithm that matches the key store's key, e.g., keyAlgorithm 'RSA' or 'EC'.
   ```
2. **Inspect the key store to determine the actual algorithm using keytool -list -v -keystore my-release-key.jks and then set the correct algorithm in build.gradle.** (95% success)
   ```
   Inspect the key store to determine the actual algorithm using keytool -list -v -keystore my-release-key.jks and then set the correct algorithm in build.gradle.
   ```
3. **If using Android App Bundle, switch to using Play App Signing and upload the original key to Google Play, then use the upload key for local builds.** (85% success)
   ```
   If using Android App Bundle, switch to using Play App Signing and upload the original key to Google Play, then use the upload key for local builds.
   ```

## Dead Ends

- **Regenerate the key with the same algorithm as expected, but keep the same alias** — This invalidates the old key and requires re-uploading to Google Play Console; also the error persists if the configuration is not updated. (60% fail)
- **Delete the key store and create a new one with the correct algorithm** — This loses existing signing credentials and may break CI/CD pipelines that rely on the old key. (70% fail)
- **Set keyAlgorithm to RSA in build.gradle** — If the actual key is EC, this still fails; the algorithm must match the key, not be hardcoded. (80% fail)
