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
1
vote
1 answer

Resource not found with flavors with different applicationIds from package name

So my app has multiple flavors with an applicationId different from the package name. When i try to see if a layout contains an id it says it doesn't contain it, but it actually does only the path for the R file is the applicationId, and the one i…
1
vote
0 answers

play protect issue with flavors

when I try to install my release apk google play protect will error. I have five flavors from this application and one of them is on the google play store. when I install the app which is on the play store, directly it will install without…
1
vote
1 answer

Flavors error - No matching client found for package name

i try to implement flavors by this guide: https://proandroiddev.com/advanced-android-flavors-part-1-building-white-label-apps-on-android-ade16af23bcf but i get this error: No matching client found for package name 'com.example.client1' this is my…
levi
  • 675
  • 2
  • 8
  • 18
1
vote
1 answer

Can library depends and reads resources from another multi flavored library?

Using: Android Studio 3.2.1 - Gradle 4.6 I have an app with 3 modules: :app :lib1 (library) :lib2 (library) :app depends from lib1 and lib2 :lib 1 depends from lib2 lib2 is a module containing only resources (res folder for images, strings, colors…
1
vote
0 answers

Flavoured source code is not compiled in Android

I have two flavours in my app with the following structure: src | flavour_1 | | | java | | | res | flavour_2 | java | res and here is…
msc87
  • 823
  • 3
  • 16
  • 32
1
vote
0 answers

How to add Different flavors to android library in maven?

I have created a library, which is distributed with maven. Right now I would like to add new library as a dependency, which size is more than 8 mb. I want to make that dependency as optional and this is why I think that creating a different library…
Viktor Vostrikov
  • 804
  • 2
  • 9
  • 26
1
vote
1 answer

Android Override file from library/base

I have made a project in which I have made my source as base and made other modules per client dependent on base source which we call as library. Those modules have dependency on our base code. All they are doing is starting BaseMainActivity from…
A.s.ALI
  • 1,659
  • 1
  • 14
  • 41
1
vote
1 answer

Android flavors: Add an external library on a specific flavor

On my project gradle, i have declared two flavors: android { compileSdkVersion 27 defaultConfig { applicationId "com.mypackage" minSdkVersion 14 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner…
1
vote
0 answers

Import lib with multiple flavor

I have a lib with this flavors: flavorDimensions "dim" productFlavors { nocustomer { versionNameSuffix "-nocustomer" dimension = "dim" } customer001 { versionNameSuffix…
1
vote
1 answer

Configuring library build types while generating signed apk in android

I am working on making a large project modular. I have separated the code and layout files and everything is working fine except one issue. I needed to create 3 build types in the module namely, beta, stage and live (for a reason mentioned later).…
1
vote
1 answer

Fragment inflation from different flavors

I am learning Android and I cannot find the solution to a fragment instantiation error when they are in different flavors. Setup: I have a main fragment that is loaded into the main activity. I have two favors: paid and free. The main (common) part…
1
vote
1 answer

How to keep a Java file for two flavors and exclude it for others in my app?

I have an Android app with, say, three flavors. The first one is called free. The second flavor is called paid. And the third flavor is called b2bClient. free and pro need a library (let it be Google Analytics), and, in order to avoid code…
Maksim Dmitriev
  • 5,313
  • 9
  • 57
  • 124
1
vote
1 answer

How to make gradle override a resource in a library project

Currently I got a project called 'Common', and a application called 'Setup' which depends on 'Common'. In 'Common', there is a 'color.xml' which is an Android resource file. What I want is depending on build type override some values in…
user2269707
1
vote
2 answers

java.lang.IllegalArgumentException: Failed to find configured root that contains "insert app directory path here"

I am opening the camera to capture a image and i followed this tutorial. Error stated in the title comes when i tried to create different flavor builds configuration for my app. This is my meta data xml resource file named file_paths for File…
Devansh Kumar
  • 1,364
  • 1
  • 13
  • 26
1
vote
2 answers

when to use android flavours vs separate projects

I have been doing some reading on Android flavours and how to use them in SO and other resources such as 1)Building Multiple Editions of an Android App with Gradle 2)Building multiple flavours of an Android app based on these examples, android…
Poorya
  • 1,133
  • 3
  • 23
  • 50