简体   繁体   中英

Difference between types of build configration ?? and how can I make an app variant in android studio ??

I am relatively new to android app development. I've been studying from android developer site. But I can't get my head around different configurations of builds.

Developer site explanation for configuring build.

Please, explain the difference between different configurations for builds. Plus kindly tell how can I make an app variant ??

I am currently working on a project in which I have 2 different modules.

  • User Module
  • Admin Module

I want to make variants in this case but I don't know how to ??

ps What build configuration would you suggest for this basic user-admin project ??

You can for example add following to your build.gradle (and set different package names for the different build flavors)

productFlavors {
    user {
        applicationId "com.mycompany.user"
    }
    admin {
        applicationId "com.mycompany.admin"
    }

You can also use this approach to set flavor specific string values....for example using something like

resValue "string", "some_string_name", "flavor specific string value"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM