Ionic Android version release and signature

Source: Internet
Author: User

Build a release version using Cordova

--release android

Or

ionic build android -release

See Build successful Description widget success

APK is generated under this path
Name of your project \platforms\android\build\outputs\apk

Create key

1. Need to use Keytool.exe
(located under the Jdk1.x.x\jre\bin directory), which is added to the environment variable path
2. Use the generated key to sign the APK with Jarsigner.exe
(located under the Jdk1.x.x\bin directory), which is added to the environment variable path
3. Open cmd
4. Generate key

D:\>keytool -genkey -alias demo.keystore -keyalg RSA -validity 40000 -keystore demo.keystore/*说明:-genkey 产生密钥       -alias demo.keystore 别名 demo.keystore       -keyalg RSA 使用RSA算法对签名加密       -validity 40000 有效期限4000天 -keystore demo.keystore */
Signature APK
D:\>jarsigner -verbose -keystore demo.keystore -signedjar demo_signed.apk demo.apk demo.keystore/*说明:-verbose 输出签名的详细信息 -keystore demo.keystore 密钥库位置 -signedjar demor_signed.apk demo.apk demo.keystore 正式签名,三个参数中依次为 签名后产生的文件demo_signed, 要签名的文件demo.apk, 密钥库demo.keystore.*/

Note: The demo.apk in the bin directory of the Android project is signed by default with the debug user, so you cannot use the above procedure to sign the file again. The correct step should be: In the project right click->anroid tools-export Unsigned Application package exported APK takes the above steps to sign.

Ionic Android version release and signature

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.