An Android keystore lets you store cryptographic key entries for security. Android Keystore can be used to sign your apk, sign data, store certificates, and a variety of other needs.
To release your app to a marketplace, you will need to setup the keystore. All updates to the same app will require the same key used to setup. This provides a level of security and prevents others from accessing your app without permission.
Open your the command prompt in admin mode on your windows machine and navigate to the directory where java installed the
keytool.exefile. This will depend on how your setup is.
Example: C:\Program Files\Java\jdk-18\bin>
Run the following command:
keytool -genkey -v -keystore ExampleKey.keystore -alias MyKey -keyalg RSA -keysize 2048 -validity 10000
Enter a password for your key.
There will additional information to complete before the keystore gets created. Continnue filling out the information and confirm at the end that your information is correct.
Once your keystore is generated, you will see the following message.
Your keystore is generated and can be found in the directory you are working in.
Once your keystore is generated, you can place your key in your Unreal Project in the following location. If there isn’t already a Builds\Android Directory, you can create one to store your key in your project:
Now that the key is in your project folder, we will apply it to the project.
- Open up your project in Unreal Engine
- Navigate to Edit > Project Settings > Platforms > Android
Locate Distribution Signing on the right hand side and expand the section. Enter the information that was used to generate and setup your keystore above, in the setup section.
Name Description Example Keystore Name given to the .Keystore file ExampleKey.keystore Key Alias Name of the keystore file MyKey Keystore Password Password created to secure the key test@123
Under the APK Packaging section, set the Store Version to 1 (one) if this is the first time you are uploading and setting up your project. Each time you re-cook your project and prepare to upload to the store, you will need to increase this number. Not changing this number can cause your upload to fail.
From the left-hand side, locate Project > Packaging and expand the Project section.
- Change the Build Configuration to Shipping.
Enable the following:
[x] Full Rebuild
[x] For Distribution
Your project should now be setup with the keystore.
For additional support, please reach out to us on our Discord.
We would love to hear your feedback, Submit a ticket in our Issue Tracker.