如何自动生成机器人为精简版和premium版本? [英] How to automate android builds for lite and premium version?

查看:131
本文介绍了如何自动生成机器人为精简版和premium版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个解决方案,这将让我建立了我的Andr​​oid应用程序精简版和premium版本,无需人工操作。 我在寻找的功能是:

I'm looking for a solutions which will allow me to build lite and premium versions of my android app without manual manipulations. The functionality I'm looking for is:

  • 自动重命名包
  • 更改在AndroidManifest.xml文件家里包的名字。
  • 更改Java或/和资源文件或替换常量值 当前相应的文件 应用程序版本。
  • Automatically renaming package
  • Changing home package name in AndroidManifest.xml file.
  • Changing constant values in java or/and resource files or substituting appropriate files for current application version.

感谢。

推荐答案

我会建议寻找到<一个href="http://developer.android.com/guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject"相对=nofollow> Android的库项目,以帮助这一点。

I would suggest looking into Android Library Projects to help with this.

我用这种方式为我的应用程序之一的精简版与免费edtions。我有一个包含所有的源和大多数的应用程序的资源,并使用1号作为一个库项目,然后2个项目,一个是精简版,一个是完整版的图书馆项目。

I use this approach for a Lite vs. Free edtions of one of my apps. I have a Library project that contains all of the source and most of the resources for the apps and then 2 projects that use the 1st as a library project, one for Lite and one for Full edition.

这两个相关的项目,每个人都有自己的资源和清单,允许命名空间是不同的,对我来说,在不同的字符串,可绘等交换取决于版本。

The two dependent projects each have their own resources and manifest, allowing the namespace to be different and for me to swap in different strings, drawables, etc. depending on the edition.

我尝试了蚂蚁的方式,但它似乎更麻烦比库项目方法。希望有所帮助。

I tried the Ant approach but it seemed to be much more of a hassle than the Library project approach. Hope that helps.

需要注意的是蚂蚁还是用来构建每个项目,但解决的分离版本的一部分。

Note that Ant is still used to build each of the projects, but not part of the solution for separating editions.

这篇关于如何自动生成机器人为精简版和premium版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆