How do you manage multiple environments while developing Android apps?

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

    You can try gradle buildType and productFlavor. It will allow you to specifiy different Environment variables like url, versionName, etc And applicationId which will allow you to have dev and prod builds. For more details http://developer.android.com/tools/building/configuring-gradle.html

提交回复
热议问题