Detailed release version of COCOS2DX 3.0 on the Android platform signing process

Source: Internet
Author: User

When your game is ready to be released, it needs to be compiled into release version, the command needs to add-m release, the compiler command is as follows:

Cocos compile-p android-m Release


At the end of the compilation, the xxx_release_unsigned.apk is generated, and the signature is prompted to enter the path of the. KeyStore.


how to generate the. KeyStore :

With Keytool, the command is as follows:

Keytool-genkey-v-keystore my-release-key.keystore-alias alias_name-keyalg rsa-keysize 2048-validity 10000

Keytool Options Description
-genkey Generate a key pair (public and private)
-V Allow verbose content output.
-alias <alias_name> The alias of the key. Only the first 8 characters are used.
-keyalg <alg> The encryption algorithm when key is generated. Supports DSA and RSA.
-keysize <size> the size (bits) of the generated key. If not provided, Keytool uses the default key size: 1024. 
Typically, we recommend using a key size of 2048 or greater.
-dname <name> Describes the identity name of the creator of the key.   in a self-signed certificate, this parameter appears in the Publisher and Subject field.  
Note that you do not specify this option under the command line. At this point jarsigner prompts you to enter each identity name field (CN, OU, etc.)
-keypass <password> key's password. For security reasons, do not include this option on the command line.   at this point, Keytool prompts you for the password.  
In this way, the password is not saved in the shell history.
-validity <valdays> The validity period of the key, in days. Note: It is recommended to use a number of 10000 or greater.
-keystore <keystore-name>.keystore Save the KeyStore name of the private key.
-storepass <password> KeyStore's password. For security reasons, do not include this option on the command line.
At this point, Keytool will prompt to enter this password.
In this way, the password is not saved in the shell history data.


After generating the KeyStore, follow the prompts and Note that the Alias_name entered here is consistent with the. KeyStore.




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.