How to create multiple Android apps from one code base

后端 未结 5 1795
醉梦人生
醉梦人生 2021-02-05 06:40

I have an Android code base which uses APIs with settings to get different data for several apps. All apps use the same code base but with one or two design tweaks. So how do I

5条回答
  •  不知归路
    2021-02-05 07:13

    The current way to approach this issue if you are using Android Studio with Gradle is by using Gradle, Build Type + Product Flavor

    http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants

    Build Variants

    One goal of the new build system is to enable creating different versions of the same application.

    There are two main use cases:

    Different versions of the same application For instance, a free/demo version vs the “pro” paid application.

    Same application packaged differently for multi-apk in Google Play Store.

    This new concept is designed to help when the differences are very minimum. If the answer to “Is this the same application?” is yes, then this is probably the way to go over Library Projects.

提交回复
热议问题