简体   繁体   中英

How combine build type and flavor to get a build variant debug<Flavor>

Is there a way to combine build type and flavor to get build variant such that resources would be taken from most specific res folder?

Lets say I have
src/main
src/debug
src/flavor1
src/flavor2

In my src/main I have basic configuration.
In my src/flavor1 and src/flavor2 I have specific configurations and I want them to be overridden by values from src/debug . But flavor values are more specific and src/debug config is ignored.

For example each flavor has @string/app_name . Ie Flavor 1 App . I want to override @string/app_name with Flavor 1 App Dev

Is there any way to get effect I want?

You can use these folders

main
  java
  res
flavor1
  java
  res
flavor1Debug
  java
  res
flavor1Release
  java
  res
flavor2
  java
  res
flavor2Debug
  java
  res
flavor2Release
  java
  res

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