-
Ant Docs
-
Build Android Project With Ant
http://developer.android.com/guide/developing/other-ide.html
-
Ant Manual
-
Ant Build Files Format
http://blogold.chinaunix.net/u/9577/showart.php?id=2487995
-
Andorid build.xml
$ANDROID_HOME/tools/ant/build.xml
-
xxx
-
Install Ant
-
Download Ant from pay attention: Don't install Ant with "apt-get install ant" on Ubuntu, or other
similar automatical way on other Linux platforms, otherwise, required
packages such as Java will be installed also, that results in Ant can't
works, following error messages will diaplay when we build application
using that incorect Ant:
- "when create .dex will fail"
- "no classfiles specified"
-
Unzip downloaded Ant package.
-
Export JAVA_HOME to environment whose value is jdk path
-
Buld Process
-
Create build.xml
-
Create A New Project
For Old Android SDK
$ activityCreator.py --out myproject my.package.name.myActivityName
For New Android SDK
$ android create project -p ...
-
Update An Existing Project
For Old Android SDK:
$ activityCreator.py --out myproject //AndroidManifest.xml
For New Android SDK
$ android update project -p
-
xxx
-
Build & Package With Ant
You can get the help info of ant with exuecuting the following command:
$ ant --help
Generally, you can build and package project with
$ant release
or
$ant debug
-
xxx
-
Support Multiple Partners
-
Prepare config.xml
Build project for different partner
match='android.versionCode="(.*)"'
replace='android.versionCode="${ver.code}"'
byline="false">
match='android.versionName="(.*)"'
replace='android.versionName="${ver.name}"'
byline="false">
match='package="(.*)"'
replace='package="${pkg.name}"'
byline="false">
-
Prepare Files
$ ant -f config.xml -Dpartner.dir="xxx" -Dpkg.name="xxx" -Dver.code="xxx" -Dver.name="xxx" preparefiles
-
Create build.xml
-
Build
$ ant debug
or
$ ant release
-
Ref
-
Android: Deploying multiple targets from one project
http://ulrichscheller.blogspot.com/2009/10/android-deploying-multiple-targets-from.html
-
xxx
-
Comments:
-
xxx
-
xxx
阅读(2775) | 评论(0) | 转发(0) |