Android build apk with command line package

Source: Internet
Author: User

Android uses Ant to build. The tools/ant below the Android SDK Build.xml is the entire process of build.

The build parameter can be override in the Ant.properties file. You can also customize the build script yourself.

Using ant build is very simple

1) Install Ant and add it to the system path variable

2) Generate Build.xml for the project

Android Update project-p.

3) Generate Debug version

Ant Debug

4) If you want to generate release version need to provide KeyStore to sign

Create a new Ant.properties file in the project root and configure the KeyStore path inside

key.store=path/to/my/Keystorekey.alias=Alias_namekey.store.password=111111  Key.alias.password=111111

5) run ant release to generate an APK with signature information

Ant Release

Note that the library libraries referenced in the project are also required to use the ant build, Mr. Build.xml.

  

This is the entire build process in the official document, if you want to do continuous integration is basically the idea above

Official documents:

Http://developer.android.com/tools/building/index.html
Http://developer.android.com/tools/building/building-cmdline.html

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.