Android generates a keystore in two ways
1. Generate android keystore in eclipse
Create any android project (for example, AntForAndroid)
Right-click the AntForAndroid root directory and choose "Android Tools"> "Export Signed Application Package...
Next>
Step 2: Create the keystore, enter the location and password for the keystore export, and remember the password. It will be used in the next Use existing keystore.
Select "Create new keystore" and save it in a directory (this example is saved in the project and directory), enter the password, and then click
Step 3: Enter the keystore information, password of some apk files, expiration time, and organization unit information. Do not forget the entered Alias and password.
Step 4: generate an apk file with a signature, and this will end.
Step 5: Use the previously generated keystore to sign the next release.
Step 6: Next, Next, end!
In this way, androids. keystore generated by the above process is generated under the project root directory.
Ii. Generate a keystore using the command line
Enter the JDK bin directory under dos
Run the following command:
Keytool-genkey-alias android. keystore-keyalg RSA-validity 20000-keystore android. keystore
(-Validity 20000 indicates the validity period.) After the command is completed, android. keystore is generated in the bin directory.
View the command keytool-list-keystore "android. keystore" and enter your keystore password.