You will now create an Android keystore. Follow these steps:
- On Mac/Linux, use the following command:
keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
- On Windows, use the following command:
keytool -genkey -v -keystore c:\Users\USER_NAME\key.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias androidkey
The keytool command stores the key.jks file in your home directory. If you want to store it elsewhere, change the argument you pass to the -keystore parameter. However, keep the keystore file private; don't check it into public source control!
- Create a file named <app dir>/android/key.properties that contains a reference to your keystore:
storePassword=your chosen password
keyPassword= your chosen password
keyAlias=androidkey
storeFile=/Users/sales/key.jks
- In the app build.gradle file, add the following instructions before the android{} block:
def keystoreProperties = new Properties()
def keystorePropertiesFile...