Android APK Signature (forward)

Source: Internet
Author: User

Cordova 3.5 for Android apk signature, generate a release apk program file Renxia 2014-06-07 00:04 Mobile development Grab sofa 16,288 views Directory[Hide]
    • (1) APK for debugging
    • (2) Release apk

Cordova When compiling Android project, call the Android SDK's default build process, which is based on Ant.

(1) APK for debugging

Cordova Build Android

The default is debug mode, which uses Debug.keystore to generate the following two files:

XXXX-DEBUG.APK (Signed, unaligned)
XXXX-DEBUG-UNALIGNED.APK (signed, aligned)

Debug.keystore's Location:

Winxp:c:\documents and Settings\administrator\.android\debug.keystore

Win7:c:\users\administrator\.android\

(2) Release apk

Cordova Build Android–release

Generate the following three files:

XXXX-RELEASE.APK (signed, aligned)
XXXX-RELEASE-UNALIGNED.APK (Signed, unaligned)
xxxx-release-unsigned.apk (unsigned, unaligned)

Get the first (xxxx-release.apk) apk file that needs to be signed. The signature method reference is as follows:

1. Generate KeyStore files using the Keytool tool of the JDK

Keytool-genkey-v-keystore lzwme-release-key.keystore-alias lzwme-keyalg rsa-validity 365

Follow the prompts to enter the action. Input reference:

Password: 123456
Organization: lzw.me
City: Beijing
Name: LZW

2. Copy the generated KeyStore file to the directory Platforms/android/

3. Create a new Platforms/android/ant.properties file with the following information:

Key.store=lzwme-release-key.keystore
Key.alias=lzwme
key.store.password=123456
key.alias.password=123456

Looking at the Platforms/android/build.xml file, Cordova provides a ant.properties interface for the build process to change the settings, so the new Platforms/android/ Ant.properties the file, and then build again.

4. Re-build

Cordova Build Android–release

Tips:

Platforms code will be generated when the project is all deleted, so be careful to save Ant.properties file!

Reference:

http://rensanning.iteye.com/blog/2030516

This article fixed link: http://lzw.me/a/cordova-3-5-android-apk-signed.html | Chi Wen Studio

Android APK Signature (forward)

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.