Android Study Notes (3)-apply for a certificate in detail and package the android project as the APK mobile app

Source: Internet
Author: User

Like installing mobile phone software for Nokia mobile phones, mobile phone software cannot be installed when the mobile phone software certificate you have installed expires. To package Android development projects as APK packages, certificates are also required. This time, we will discuss this issue in detail.


● Certificate Application


In start-à run, enter "cmd", then locate the bin installation directory of javajdk, enter "D:", and press enter, as shown below:




Enter "cd d: \ Java \ bin". Note that there is a space after "cd", as shown below:

 


 

Then enter the command line "keytool-genkey-alias myandroid. key store-keyalg RSA-validity 100-keystore myandroid. keystore ". -validity indicates the validity period of the certificate. It is written for 100 days. A space is required after each segment, but the space and the Return key are both counted as passwords! After the Enter key is as follows:




Enter the password twice as follows:




Next, enter your personal information as follows:




Finally, enter "Y" and press Enter,




This is done. There is a certificate in the bin folder of the Java installation directory, but please note that this certificate should not be moved, otherwise it will not be found during packaging in eclipse!

 


 

● Package the project as APK


Right-click the project and choose "android Tools" -- à "Export sinned application package", as shown below:




In the displayed dialog box, select the project to export




Click "Next" to select a certificate. If you have a certificate, you can select the certificate location and enter the password. If not, create a certificate. Because I just created a new certificate, I directly select this certificate:

 


Click "Next" and select the selected certificate:




Click "Next" and select the location of the packaged APK mobile phone software. I chose to be on the desktop:




Click "finish", which is the compressed APK software:




In this way, you can package the project in APK format and run it on the Android mobile phone.


This is my learning result. You are welcome to repost it. Please feel free to share it with us, but make sure to provide the link for this article: http://blog.csdn.net/youqishini/article/details/7342083,xie ~



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.