To create a "release" APK / AAB (one that you can distribute, e.g. through WWW or by uploading it to Google Play) you need to create your key store, and use it to sign your packages.
Note
|
There is also a way to create a key store without using Android Studio or Play Store or interacting with Google, if you don’t want to follow Google instructions. You can do it using Java keytool. Call this on the command-line:
keytool -genkey -v -keystore my_keystore_name.keystore -alias my_alias -keyalg RSA -keysize 2048 -validity 10000
and fill an interactive questionnaire to provide the passwords and certificate details. Be sure to save the generated keystore file and passwords secure.
|
Once you have your keystore, create AndroidSigningProperties.txt
file at the top of your project (along the CastleEngineManifest.xml
file). Add there these lines:
key.store=<path-to-your-keystore>
key.alias=<key-alias-in-your-keystore>
key.store.password=<my-password>
key.alias.password=<my-password>
This will allow you to create release APK / AAB files. Our build tool will automatically use it when making a "package" in "release" mode.
Note that for new applications uploaded to the Google Play store, you have to use AAB format (not APK). And in this case, you have to let Google Play handle signing for you (internally, Google Play will unpack your AAB and create APK from it). You still need to sign the file you upload using the upload key, so you still need the key store.
There are more options (see Google docs), but for us it seems it’s simplest to use "App signing preferences → Export and upload a key from Java keystore" and upload to Google your (encrypted) keystore following recommendations there.