1. Create an android Project
Parameter description:-k/-- package is the namespace (package name)-A/-- name Project name-P/-- path project-T is the version number of the Target Platform
Command:./Android Create Project-K com. Android. Yunju-A Yunju-T 5-P ~ /Download/Yunju
Run the following command to List version numbers of different platforms: Android list targets
2. Existing project updates
To update an existing Android project with the created Project ant, you can update it (modify the version of the platform). In this way, ant configuration files such as build. XML are automatically added.
Command:./Android update project -- name Yunju-T 5-P ~ /Documents/Yunju/
Of course, you must go to the android SDK tools directory.
3. command line compilation and packaging
Reference: http://developer.android.com/tools/building/building-cmdline.html
The ant parameter is as follows: Debug: Build a release with a signature for debugging: Build an application, and the generated APK must be signed before release install: Install the package for debugging and build to the running simulator or device; reinstalluninstall
In the android project file: ant debug, the APK for debugging signature is packaged.
4. Release packaging method
Add
key.store=path/to/my.keystorekey.alias=mykeystorekey.store.password=wodemimakey.alias.password=wodemima
Re-run: ant release
-release-sign: [echo] Signing final apk... [signapk] Run cancelled: no changes to input file /Users/rongfzh/Documents/YunJU/bin/yunju-release-unsigned.apk [zipalign] Run cancelled: no changes to input file /Users/rongfzh/Documents/YunJU/bin/yunju-release-unaligned.apk [echo] Release Package: /Users/rongfzh/Documents/YunJU/bin/yunju-release.apk[propertyfile] Updating property file: /Users/rongfzh/Documents/YunJU/bin/build.prop[propertyfile] Updating property file: /Users/rongfzh/Documents/YunJU/bin/build.prop[propertyfile] Updating property file: /Users/rongfzh/Documents/YunJU/bin/build.prop[propertyfile] Updating property file: /Users/rongfzh/Documents/YunJU/bin/build.prop-post-build:release:BUILD SUCCESSFULTotal time: 2 seconds
Generate three APK files, one of which is the signed and published APK.
You can also package and install now: ant release install