Vue+cordova Create Hybird Hybrid Application (ii)----Generate secret key

Source: Internet
Author: User

We mentioned in the previous section how to package a hybrid application. So when we pack, we need to publish, the release needs to use a different key, then do these key how to generate it. 1. Use the Keytool command provided in the JDK to generate a signing certificate

Of course, when you use this command, please add keytool to the environment variable.
Have you seen these xxx? They are actually your package name and will prompt you to name it when we create the application. If not named in time, called Hello World also does not matter, can change. However, it is recommended that all use a uniform name to facilitate maintenance.

Keytool-genkey-v-keystore xxxx.keystore-alias xxxx-keyalg rsa-validity 365

Generally, we will have a proprietary key folder, placed in the root directory, the creation of key, you can use the relative path, directly put the KeyStore under the key folder.

Detailed Command Reference:



The various details to generate the secret key should be recorded so that you can query later.

Examples are as follows:

Secret key password 87654321
password 87654321 name:
organizational unit name:
Shenzhen Aerospace Intelligent City System Engineering Technology Research Institute
Organization name:
China space
City Name:
Provinces and autonomous regions name:
country, Region code:

At the same time, once the signature is successful, please upload the secret key to Git store on time, otherwise it will cause a lot of trouble if the secret key is lost. 2. Use the secret key generated by Keytool to sign our app

If you use Build.json, this step can be ignored. The method of step "3" is recommended.

Of course, Jarsigner is also to be added to the environment variable.

Jarsigner-keystore xxxx.keystore-digestalg sha1-sigalg Md5withrsa xxxx-release-unsigned.apk XXXX
3. Generate Package Description file

Create a new file named Build.json and put it under the root directory.

File specific content, you can refer to the following content. This time you will find that the alias that created the app works.

  Android": {"
    Debug": {
      "KeyStore": "./key/dapengwater1.0.debug.keystore",
      "Storepassword": " ascsdapeng0815 ",
      " Alias ":" Dapengwater1.0.debug ",
      " password ":" ascsdapeng0815 ",
      " Keystoretype ":" "
    "release": {
      "KeyStore": "./key/dapengwater1.0.keystore",
      "Storepassword": "ascsdapeng0815 ",
      " Alias ":" daPengWater1.0 ",
      " password ":" ascsdapeng0815 ",
      " Keystoretype ":" "
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: 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.