Product flavors represent different versions of your app that you may release to users, such as free and paid versions of your app.
You can customize product flavors to use different code and resources, while sharing and reusing the parts that are common to all versions of your app. Product flavors are optional and you must create them manually.
Questions tagged [android-flavors]
106 questions
0
votes
1 answer
configure mulitple google-services.Json for different flavours in FCM
I am trying to implement multiple google-service.json file as per different flavors in android project.
I had tried using code from :…
![](../../users/profiles/755094.webp)
ios developer
- 3,057
- 2
- 43
- 93
0
votes
1 answer
Add environment variable to product flavor
I want to define an environment variable that is specific to a particular product flavor but I can't seem to get it to work.
I have tried adding the following
buildConfigField "string", "APP_TYPE", "\"demo\""
But I receive the…
![](../../users/profiles/2026768.webp)
Dan
- 4,211
- 4
- 29
- 55
0
votes
2 answers
How to manage configuration based on build type and build flavor
In my app I have 2 build types release and debug, below is the code snippet.
buildTypes {
getByName("debug") {
applicationIdSuffix = ".debug"
versionNameSuffix = ".debug"
buildConfigField("boolean", "DEBUG_MODE", "true")
…
![](../../users/profiles/5436986.webp)
DisplayName
- 172
- 1
- 9
0
votes
1 answer
No classes from main sources from multi flavor library
I have a library project with 2 flavors
configurations {
// Initializes placeholder configurations that the Android plugin can use when targeting
// the corresponding variant of the app.
internalDebug {}
internalRelease {}
…
![](../../users/profiles/527808.webp)
dilix
- 3,510
- 3
- 27
- 53
0
votes
2 answers
Modifying build.gradle for a particular flavor
I am modifying a build.gradle with specifical code for a single flavor. Specifically, I'm modifying internally this cycle
project.android.applicationVariants.all { variant ->
Is a best practice to wrap the custom code for johndoe flavor in
if…
![](../../users/profiles/7674438.webp)
Lore
- 648
- 1
- 10
- 35
0
votes
1 answer
issue while creating flavors in android project with multiple applicationid
below is the steps in performed in bundle file
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.collegemobile.free.free"
minSdkVersion 19
targetSdkVersion 28
…
![](../../users/profiles/755094.webp)
ios developer
- 3,057
- 2
- 43
- 93
0
votes
1 answer
Export existing android app as aar (like a library)
Background: I have an android application that has been published in GooglePlay and I want to create SDK from that existing application so that others can use it as a library inside their apps.
So far: I was able to generate .ARR file from the…
![](../../users/profiles/5235032.webp)
Jayanth
- 4,620
- 2
- 16
- 32
0
votes
1 answer
Why is not my variable in Gradle script not defined?
What I want to do is to create 6 different variants, each with little varying AndroidManifest. The data is calculated dynamically, so I can't simply put it into variant/AndroidManifest.xml by hand.
When I run the build script for a specific variant,…
![](../../users/profiles/1048423.webp)
Habba
- 1,087
- 2
- 12
- 29
0
votes
1 answer
Gradle variable from another applicationId flavor
I need to build an application created with a flavor and create a dynamic variable who points to an applicationId of another flavor (Because the code of an internal library uses the applicationId of other applications) but I don't know how to do…
![](../../users/profiles/6876276.webp)
J-Jamet
- 725
- 6
- 17
0
votes
1 answer
Correct way to develope a free and paid version of an app
I have an application that has free features and paid features.
Let's suppose that an activity, in free version can perform operation A, operation B, and has a disclaimer that in order to unlock operation C, user must purchase the full version.…
![](../../users/profiles/2854416.webp)
Ferra
- 91
- 8
0
votes
0 answers
Android library with flavors and dependencies
I have custom library with flavors "water" and "blue" :
flavorDimensions "water", "blue"
productFlavors
{
water
{
flavorDimensions "water"
}
blue
{
flavorDimensions "blue"
}
}
configurations
{
…
![](../../users/profiles/9305217.webp)
BejanCorneliu
- 65
- 1
- 8
0
votes
1 answer
Best Practice to use flavors in app
I know that I can check for flavors like:
if (BuildConfig.FLAVOR.equals("someFlavor")) {
//do some thing...
}
But this deserve very much conditions to check for every step.
What is the best practice to check for flavor?
user8894938
0
votes
1 answer
How should I release multiple flavours of my Android app?
I've already released an Android app in the Play Store. How should I release multiple flavours, like a demo version vs. a full version?
Can the installation of a full version override an already installed demo version?
![](../../users/profiles/5730461.webp)
Shailendra Sachan
- 121
- 1
- 5
0
votes
1 answer
Logging out on one android flavor logs out the other flavor too on same device
I have built two different flavors of the same app, while running on the same device If I logout from one app it logs out the other app as well. In my app Logout is a network call so when I click one logout button I can see network calls for both…
![](../../users/profiles/1174324.webp)
pradex
- 328
- 4
- 17
0
votes
0 answers
What is the use of flavorDimensions in builld.gradle (AndroidStudio)?
I opened one project in build.gradle was also something unfamiliar to me:
flavorDimensions "release", "default"
productFlavors {
main {
applicationId "com.xxxx.xxxx"
dimension "default"
}
underground…
![](../../users/profiles/5219099.webp)
Roga Men
- 483
- 5
- 14