How do you manage multiple environments while developing Android apps?

前端 未结 6 620
温柔的废话
温柔的废话 2020-12-22 23:04

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:22

    This I think is considered as the bast practice in case you use android studio with gradle.

    You may want to look at this article: http://tulipemoutarde.be/2013/10/06/gradle-build-variants-for-your-android-project.html

    Also available in youtube video: https://www.youtube.com/watch?v=7JDEK4wkN5I

    This also allows you to have two different package name for the same app.

    It uses gradle flavors to achieve exactly what you are looking for and is very easy to implement.

提交回复
热议问题