Build multiple (test/prod) versions of Android APKs in Eclipse

前端 未结 5 492
鱼传尺愫
鱼传尺愫 2020-12-24 07:38

I\'m looking to optimize generating of slightly different APKs of the same Android app, the only difference being the http API server it\'s using (dev/staging/prod).

5条回答
  •  情话喂你
    2020-12-24 07:47

    I think using ant build script would be the easiest solution. Eclipse supports ant build, so you can run ant command in eclipse.

    You can solve your problem with ant like this.

    1. prepare two xml android resource file.
    2. build a package with resource #1
    3. overwrite resource #1 with content of resource #2
    4. build another package

    xml would be like this:

    resource #1:

    
        dev
    
    

    resource #2:

    
        staging
    
    

    and ant script would be like this:

    
      
         
         
         
         
      
    
    

提交回复
热议问题