Release the android APK software for release

Source: Internet
Author: User
    Blog type:

  • Android
The eclipseandroid CC ++ algorithm uses eclipse to generate APK files under the bin directory. All these files are in the debug version. How can I create the software for the release version?
In fact, it is quite simple.

1. Use the built-in keytool of Java to create the release version of keystoreJava code

  1. Keytool-genkey-v-keystore keystore_name.keystore
  2. -Alias alias_name-keyalg RSA-validity 10000

Keystore_name.keystore: name of the release version of The keystore to be created
Alias_name: alias? Take a good note of the name, which will be used later
-Keyalg RSA: generated using the RSA Algorithm
-Validity 10000: validity period, in days

If the Java environment is configured properly, the following information will appear after you enter the command
Enter keystore password: (keystore password)
Re-enter new password: (confirm the keystore password)
What is your first and last name?
[UNKNOWN]: (name. Use your favorite name. I don't know where it will be displayed)
What is the name of your organizational unit?
[UNKNOWN]: (Organization Unit)
What is the name of your organization?
[UNKNOWN]: (organization, I don't know what the difference is from the one above)
What is the name of your city or locality?
[UNKNOWN]: (city)
What is the name of your state or province?
[UNKNOWN]: (state, province, and county)
What is the two-letter country code for this unit?
[UNKNOWN]: CN
Is Cn = unknown, ou = unknown, O = unknown, L = unknown, St = unknown, c = cn correct?
[No]: Yes (confirm the entered information)

Generating 1,024 bit RSA key pair and self-signed certificate (sha1withrsa)
A Validity of 10,000 days
For: Cn = unknown, ou = unknown, O = unknown, L = unknown, St = unknown, c = Cn
Enter key password for <alias_name>
(Return if same as keystore password) :( alias password. If it is the same as the keytore password, press Enter)
Re-enter new password: (confirm the alias password)
[Storing my-release-key.keystore]

2. Create an APK file for release
In eclipse, right-click the project to be released and selectAndroid Tool->Export signed application package...
Step-by-Step: select the generated release version keystore, enter the password, select alias, enter the alias password, and generate the release version APK.

Ah, the world is quiet ~~~

Finally, it is installed.
Because a new signature is used, you must uninstall the original program before installing it.

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.