How do you manage multiple environments while developing Android apps?

前端 未结 6 770
隐瞒了意图╮
隐瞒了意图╮ 2020-12-22 23:15

We\'re building an Android app that connects to the cloud. We have a test URL for our APIs and a production URL. We connect the app to our local development machines to talk

6条回答
  •  一个人的身影
    2020-12-22 23:29

    Use Ant to build at least the production versions. This way you can set certain config values/flags during building. Let's say you have a config.xml file that contains the URL to the server. You can have different Ant build targets that will change the URL to point to the appropriate server. Check out this tutorial. It explains exactly how that is done.

提交回复
热议问题