Questions tagged [android-flavors]

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.

106 questions
31
votes
2 answers

How to use different package names between flavors?

I'm trying to create a single project with 2 flavors: free and pro (versions). My app is already in PlayStore with different packages (E.g.: com.example.appfree and com.example.app) This is my build.gradle: defaultConfig { applicationId…
Felipe Porge Xavier
  • 2,095
  • 6
  • 17
  • 26
27
votes
2 answers

Gradle Warnings: Could not find google-services.json while looking in

I got the following warnings. How can I avoid this warnings? Could not find google-services.json while looking in [src/flavor1/debug, src/debug, src/flavor1] Could not find google-services.json while looking in [src/flavor1/release, …
DrumRobot
  • 267
  • 1
  • 3
  • 13
18
votes
3 answers

Android Studio build flavors - How to have same source files in diverse flavors

I need to create a demo flavor in android studio for an app. In my app level gradle file i have created another flavor called demo and the default flavor of full of course. It looks like this: apply plugin: 'com.android.application' android { …
j2emanue
  • 51,417
  • 46
  • 239
  • 380
11
votes
1 answer

Ionic2/Cordova build publish app with different features. Example: Free and Paid

I'm developing an application, where it will have a paid (full) version and a free (lite) version. In another application developed for Android it is possible to manage this easily with flavors (productFlavors), where I can configure the replacement…
Fernando Leal
  • 8,253
  • 4
  • 22
  • 43
9
votes
4 answers

BuildConfig.DEBUG vs ApplicationInfo.FLAG_DEBUGGABLE

As refer by Getting "debuggable" value of androidManifest from code?, there are two options of checking if the build is debuggable: 1.) BuildConfig.DEBUG flag if (BuildConfig.DEBUG)` 2.) ApplicationInfo.FLAG_DEBUGGABLE if (0 !=…
Elye
  • 30,821
  • 26
  • 115
  • 272
7
votes
1 answer

ViewBinding - Different Flavor Layout Resource

I have a flavor that contains the same layout resource that is in my main source set. This is so it overrides the main one with the flavor specific one. I have done this in many places and it works fine until I introduced ViewBinding. For accuracy,…
6
votes
0 answers

Different flavours for 3 different firebase projects

I am having 3 different domains, A,B and C. I have created 3 different Firebase projects in their individual respective consoles. My Question I am planning to create a single Android project and add flavours to them to support A,B,C and also place…
GeekDroid
  • 1,634
  • 3
  • 16
  • 36
6
votes
0 answers

Android Product Flavors for Java Web Projects

I am wondering if someone has tried to use Android Product Flavors for simple Java Web Projects (e.g. Spring Boot) and can show me the best approach to do that? We are using IntelliJ for web service development and it should reflect selected…
6
votes
2 answers

Keep flavors configs in separate .gradle files

Being short - is there a way to keep flavor configs in separate .gradle files? And for more details - I'd like to have per flavor .gradle files (like flavorGermany.gradle, flavorUkraine.gradle, flavorItaly.gradle etc.) that will be included with…
5
votes
1 answer

Use different library module for each android flavor

I want to use a different library module for each flavor. For example: free flavor -> I need to use the free library module paid flavor -> I need to use the paid library module My flavors productFlavors { free{ ....... } …
Ranjith Kumar
  • 13,385
  • 9
  • 95
  • 126
5
votes
2 answers

Flavors - No matching client found for package name

My Gradle is like bellow: apply plugin: 'com.android.application' apply plugin: 'io.fabric' apply plugin: 'com.google.gms.google-services' buildscript { repositories { mavenCentral() maven { url 'https://maven.fabric.io/public'…
user4813855
5
votes
1 answer

publish android libraries with flavors

is it possible to publish android libraries with flavors? My initial test with jitpack that I usually use to publish libraries failed. Can anyone point me to a working example of a setup like this? Got the flavors working locally inside one project…
ligi
  • 35,518
  • 37
  • 123
  • 220
4
votes
1 answer

How to use final resolved applicationId in build.gradle

Say I have the following build.gradle android{ defaultConfig{ applicationId "com.example.base" } buildTypes{ release{ minifyEnabled true } debug{ applicationIdSuffix ".dev" …
4
votes
3 answers

manifestPlaceholders value is not string

In my AndroidManifest.xml file I have the following meta-data tag which should be populated dynamically: My gradle file looks like…
DàChún
  • 4,079
  • 1
  • 31
  • 37
4
votes
1 answer

Android - flavor version naming

I'm developing a white label application. the application have many flavors, each flavor is for different client. All flavors are shearing the core logic and difference between them is mostly in design. the question is what is the best practice for…
Sergey
  • 384
  • 1
  • 12
1
2 3 4 5 6 7 8