Android应用批量发布
我们有几个应用程序在布局和代码上非常相似。唯一的区别是我们将切换图形元素,并对单个常量文件和字符串文件进行更改。当然,这有几个问题——第一个是命名空间。具有相同命名空间的应用程序将覆盖任何其他应用程序。
这样做有哪些建议? 目前我们的命名空间是: com.公司.应用程序名称 我想我可以这样做: com.company.appname.appversion
我看过有关 ant 脚本的帖子,可以帮助解决此问题,但我想知道现在是否有更流畅的解决方案。
We have several apps that will be very similar in layout and code. The only difference is we will be switching out graphical elements, and making changes to a single constants file and strings file. Of course, theres several problems with this -- the first being namespace. Having an app with the same namespace will overwrite any other apps.
What are some suggestions to doing this?
Currently our namesapce is:
com.company.appname
I figured I could do:
com.company.appname.appversion
I've seen post about ant scripts that helps with this, but I'm wondering if theres more fluid solutions now.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议查看 Android 库项目来帮助解决这个问题。
我将这种方法用于我的一个应用程序的精简版与免费版。我有一个库项目,其中包含应用程序的所有源代码和大部分资源,然后有 2 个项目使用第一个项目作为库项目,一个用于精简版,一个用于完整版。
这两个依赖项目都有自己的资源和清单,允许命名空间不同,并且我可以根据版本交换不同的字符串、绘图等。
我尝试了 Ant 方法,但它似乎比 Library 项目方法麻烦得多。希望有帮助。
I would suggest looking into Android Library Projects to help with this.
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.