Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2087940
  • 博文数量: 413
  • 博客积分: 10926
  • 博客等级: 上将
  • 技术积分: 3862
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-09 18:14
文章分类

全部博文(413)

文章存档

2015年(5)

2014年(1)

2013年(5)

2012年(6)

2011年(138)

2010年(85)

2009年(42)

2008年(46)

2007年(26)

2006年(59)

分类: Android平台

2009-02-13 18:15:47

  1. Ant Docs
    1. Build Android Project With Ant
      http://developer.android.com/guide/developing/other-ide.html
    2. Ant Manual
    3. Ant Build Files Format
      http://blogold.chinaunix.net/u/9577/showart.php?id=2487995
    4. Andorid build.xml
      $ANDROID_HOME/tools/ant/build.xml
    5. xxx
  2. Install Ant
    1. 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"
    2. Unzip downloaded Ant package.
    3. Export JAVA_HOME to environment whose value is jdk path
  3. Buld Process
    1. 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
    2. 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
    3. xxx
  4. Support Multiple Partners
    1. 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">
             
             
             
                 
                 
                 
             


             
                 
                 
                 
             

         

         
    2. Prepare Files
      $ ant -f config.xml -Dpartner.dir="xxx" -Dpkg.name="xxx" -Dver.code="xxx" -Dver.name="xxx" preparefiles
    3. Create build.xml
    4. Build
      $ ant debug
      or
      $ ant release
    5. Ref
      • Android: Deploying multiple targets from one project http://ulrichscheller.blogspot.com/2009/10/android-deploying-multiple-targets-from.html
      • xxx
    6. Comments:
    7. xxx
  5. xxx


阅读(2767) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~