简体   繁体   English

如何为Beta测试人员和Market构建多个Android应用程序版本?

[英]How can I build multiple Android app builds for beta testers and for the Market?

I would like to produce 2 builds of my Android app: 我想生成2个Android应用程序的构建版本:

  • one build which will be as close as possible to what ends up on the Android Market when I release it, and which will be distributed to testers who do not work at my company 一种版本,该版本将与我发布时在Android Market上最终发布的版本尽可能接近,并将分发给不在我公司工作的测试人员
  • one build which will be tested internally by programmers at my company. 一种版本,将由我公司的程序员进行内部测试。 This will be very similar to the other build, but will have some extra functionality, like being able to configure (at runtime) which server environment it talks to 这将与其他构建非常相似,但是将具有一些额外的功能,例如能够(在运行时)配置与之通信的服务器环境。

Is there an easy way to modify my build to build both these artifacts? 有没有一种简单的方法可以修改我的构建以构建这两个工件? If I could just set a single variable's value to something passed in on the command line during the build, I could dispatch on that value in different parts of the app for different behavior. 如果我可以将单个变量的值设置为在构建过程中在命令行中传递的内容,则可以针对不同的行为在应用程序的不同部分中分派该值。 However, I'm not sure that's the best way to do this, nor do I know a good way of getting that into my code. 但是,我不确定这是最好的方法,也不知道将其纳入代码的好方法。

I'm using the off the shelf build.xml file that Android produced for me right now. 我正在使用Android现在为我生成的现成的build.xml文件。

Thanks! 谢谢!

When you have an automatic build chain (ie running everything through ant), you can create one java file that contains that variable from the ant run. 当您具有自动构建链(即,通过ant运行所有内容)时,您可以创建一个java文件,其中包含来自ant运行的变量。 And here you can set the variable depending on the target environment. 在这里,您可以根据目标环境设置变量。 The build will then compile that file with all others and package it up. 然后,该版本将与所有其他文件一起编译该文件并将其打包。

It may be possible to also have a replace task in ant, that takes an existing file and just replaces a token ##var## with the variable content. 也可能在ant中有一个替换任务,该任务需要一个现有文件,而只是用可变内容替换标记##var##

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何让Android app alpha / beta测试人员免费下载该应用程序? - How do I allow android app alpha/beta testers to download the app for free? 我可以找出我的哪些Beta测试人员实际安装了我的Android应用程序吗? - Can I find out which of my beta testers have actually installed my Android app? 测试人员如何在crashlytics beta中接收应用程序更新 - How can testers recieve app updates in crashlytics beta 如何在不使用Market的情况下将Android应用分发给beta测试人员 - How do I distribute Android app to beta tester without using Market Android应用,让Beta版测试人员免费访问专业版 - Android app, Give beta testers access to pro version for free 多个用户可以访问/更新市场中的单个 Android 应用程序吗? - Can multiple users access/update a single Android app in the Market? 如何在Android上比较A应用程序和B应用程序版本? 没有市场 - How can I compare A app and B app version on android? without market 如何找到Android市场在某些手机上过滤我的应用的原因 - How can I find why Android market is filtering my app on certain phone 如何在没有市场而非系统应用的情况下在 android 上自动安装 apk - How can I auto install apk on android without market NOT system app 如何在Android电子市场中提高我的应用的搜索显示率? - How can i increase the search display rate of my app in Android Market?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM