First, build the KeyStore file using the Kdytool that comes with the Android SDK:
100000 -keystore Android.keystore
Parameter meaning:-validity mainly is the validity of the certificate, write 100,000 days; spaces, backspace keys are counted.
The process inside DOS:
(D:\Program files\java\jdk1.7.0_25\bin> Keytool-genkey-alias Android.keystore-keyalg rsa-validity100000-keystore android.keystore input keystore Password: Android What is your first and last name? [Unknown]: SXL What is your organizational unit name? [Unknown]: XS What is your organization name? [Unknown]: XS What is the name of your city or region? [Unknown]:NULLWhat is the name of your state or province? [Unknown]:NULLWhat is the two-letter country code for this unit [Unknown]:NULLCN=SXL, Ou=xs, O=xuesheng, l=NULL, st=NULL, c=NULLis it correct? [No] y input<android.keystore>Master password (if same as KeyStore password, press ENTER):)
The process of the Linux terminal
[Email protected] ~]$ Keytool-genkey-alias android.keystore-keyalg rsa-validity100000-keystore android.keystoreenter keystore password:re-Enter new Password:what is your first and LastName?[Unknown]: Sxlwhat is the name of the Your organizational unit?[Unknown]: Xswhat is the name of your organization?[Unknown]: Xswhat is the name of the your city or Locality?[Unknown]:NULLWhat's the name of your state or province?[Unknown]:NULL What is the-letter Country Code forThis unit?[Unknown]:NULLis CN=SXL, Ou=xs, O=xs, l=NULL, st=NULL, c=NULLCorrect?[No]: Yenter key Password for<android.keystore>(RETURNifSame as KeyStore password):
Second, Eclipse Android generates APK files
1, select the items to be packaged, right-click –>androidtools–>exportsignedapplicationpackage ...
2. Select a packaged item
3. Select the generated Eclipse android.keystore file and enter the password
4. Select Aliaskey and enter the password
5. Finally select the directory and file name to generate the androidapk file
6. The resulting APK file