Symptoms:
- I cannot upload my Android keystore to Unity Build Automation (UBA).
- The system indicates the keystore is invalid or corrupted.
- The same keystore successfully builds and uploads .aab files locally to the Google Play Store.
Cause:
The issue typically arises from mismatched configurations or credentials between Unity Build Automation and Google Play Store. Possible causes include:
- A mismatch between the SHA1 fingerprint of the keystore used locally and the one uploaded to UBA.
- Incorrect or mismatched keystore or key passwords.
- Keystore compatibility issues with Unity Build Automation.
Resolution:
To resolve this issue, follow these steps:
-
Verify Keystore Information:
- Check the SHA1 fingerprint of your keystore using the
keytool
command: - Compare the SHA1 fingerprint with the one expected by Google Play in the App Integrity > App Signing section of the Google Play Console.
- Check the SHA1 fingerprint of your keystore using the
-
Confirm Keystore Details in Unity:
- Navigate to Project Settings > Player > Publishing Settings.
- Verify that the correct keystore file, alias, and password are used.
-
Ensure Matching Keystore and Key Passwords:
- Confirm that both the keystore and alias passwords are identical, as UBA sometimes requires this configuration.
-
Delete Existing Android Credentials via API:
- Use the Unity Build API to clear existing Android credentials before uploading the keystore again:
- Re-upload the keystore in UBA after clearing credentials.
-
Generate a New Keystore (Optional):
- If the issue persists, generate a new keystore using Unity's Keystore Manager. Ensure it aligns with the UBA requirements.
-
Request a Key Reset (If Necessary):
- If the original keystore is lost or invalid, contact Google Play Support to reset the key. Note that this process may take a few days.
-
Additional Tips:
- Always back up your keystore securely to avoid potential delays or data loss.
- Use Unity’s Keystore Manager for better compatibility with Unity Build Automation.
- Regularly update and verify keystore details in both Unity and Google Play Console.
More information:
Unity Build Automation Documentation