How do you manage multiple environments while developing Android apps?

前端 未结 6 764
隐瞒了意图╮
隐瞒了意图╮ 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:23

    I don't know what's the best practice in that case, but I do like this:

    You could make your app a LIB and create 2 apps: production app and testing app. Import your lib for those apps and build their manifests (it's almost copy paste of the old one). Then you replace your /res/ files that are different in each app... (you could create a config.xml file that have the URL).

提交回复
热议问题