The Android program must have a signature to run. Usually we use the debug version is the debug signature, without our concern. When we publish the program ourselves, we need our own signature. In fact, no matter which IDE is used, the Keytool and Jarsigner are the only two Java tools to complete the signature task (in the Bin directory of the JDK). Where Keytool is used to generate KeyStore (certificates), Jarsigner is used to make signatures.
Keytool usage examples are as follows:
-genkey-alias-keyalg-keysize1024-keypass-validity365-keystore lincapp.-storepass android
Jarsigner usage examples are as follows:
jarsigner -keystore lincapp.keystore -signedjar lincapp_signed.apk lincapp.apk lincapp
In fact, it is more convenient for us to directly use the signature features provided by the IDE.
Eclipse:
Project Right-click->android tools->export singed application package, simply fill in the information. Note to remember the password.
Android Studio:
Build->generate signed APK, the process is similar to eclipse.
Reference:
Http://www.cnblogs.com/ok-lanyan/archive/2013/04/02/2995462.html
Android Combat Tips 13: APK signature