The Android system requires all the installed applications to be digitally signed with a certificate whose private key is held by the application's developer. The Android system uses the certificate as a means of identifying the author of an application and establishing a relationship of trust between applications. The certificate is not used to control which applications the user can install. The certificate does not need to be signed by a certificate authority; it can be self-signed. Certificates can be signed on either Mac or Windows systems.
keytool
command, add in the following lines and press Enter:
keytool -genkey -v -keystore my-release-key.keystore -alias aliasname -keyalg RSA -validity 999999
keytool
command. Under Key Alias, choose the alias name you created for your key from the pull-down menu and enter your password when prompted. Select the Browse button to choose a location for your app build. Choose the Build button when finished:The keytool
command generates the keystore as a file called my-release-key.keystore
. The keystore and key are protected by the passwords you entered. The keystore contains a single key, which is valid for 999999 days. The alias is a name that you will use later to refer to this keystore when signing your application.
Your keystore password is something that you create and must remember when you build your app in Corona. There will be an option if you want to use a different password for the alias name. You can press Enter to use the same one while you're in the Terminal or Command Prompt.
When you create your build in Corona, make sure that your version number is an integer with no special characters. Also, you will have to make sure that your build.settings
file includes the versionCode
as well. This will be the same number as your version number. Refer to Chapter 9, Handling Multiple Devices and Networking Your Apps for more information.
The Java scheme in your build is the reverse of your domain name with the name of your product/company appended and the name of your app, for example, com.mycompany.games.mygame
.
When you have built your app by using your private key and you have selected an alias name, the .apk
file will be created and will be ready to be published on the Google Play Store.