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)