Questions tagged [android-flavordimension]

31 questions
30
votes
3 answers

gradle: apply plugin only for specific flavor

My Android gradle currently set a flavor dimension for using different push service. (One for baidu push and one for GCM) I would like to have my Android app only to import google-services for a GCM push build flavor. Is it possible to do it? P.S.…
28
votes
2 answers

Android Studio: product flavor combination with more than two flavor dimensions (flavor groups)

I am developing an Android application using Android Studio (v 2.1, gradle plugin v 2.1.0). My application has various versions which share a lot of common code so I decided to use flavor dimensions and product flavors to customize code and…
7
votes
3 answers

Combined BuildConfig variables in gradle flavor dimensions

In my Android application I have two flavor dimensions: "brand" (brand1, brand2) and "environment" (staging, production). I added the "environment" dimension after a while and I had previously defined some BuildConfig variables for the different…
6
votes
2 answers

In Multi Flavour app, how to avoid duplicate resources

If I have 3 flavors flavor1, flavor2 and flavour3, each flavor has Dev,Pat and Prod "sub-flavours" versions which different parameters , but each main flavor have different resources. So I have now 9 different flavors, but only 3 different resource…
5
votes
0 answers

How to add signing configs to Multi-FlavorDimensions (ProductFlavors)?

For example I have a gradle build as below: signingConfigs { configFlavor1 { keyAlias 'alias1' keyPassword 'password1' storeFile file('location1') storePassword 'password1' v1SigningEnabled true …
5
votes
1 answer

How do I specify signingConfigs for different product variants with flavor dimensions?

This has been asked before (e.g. Gradle signing with flavors and dimensions), but the answers don't seem to work with Gradle 3.5. With 2 flavor dimensions I'm specifying signingConfigs per release variant like this: signingConfigs { …
4
votes
1 answer

React Native - How to have productFlavors with different applicationIds?

I have a RN code and I want to have 2 flavors on Android. These flavors are different in: ic_launcher & drawable strings applicationId I added to product flavors in the app/build.gradle file and also added a directory res & AndroidManifest.xml for…
3
votes
1 answer

How do I handle Product Flavors in a React Native Android app?

My React Native app has 3 versions: App1, App2, App3. Each of these has a dev and prod version. I've set these up in android/app/build.gradle as follows: flavorDimensions "client", "backend" productFlavors { app1 { …
Sharon
  • 3,471
  • 13
  • 60
  • 93
3
votes
2 answers

Gradle Building Schema dynamically from combined flavor dimensions

We have two different flavor dimensions like in this example and we want to dynamically generate applicationId like com.company.apple instead this script will generate an applicationId of null.company.apple I believe this is because the…
3
votes
1 answer

Gradle: How to set signingConfig in buildTypes for multi-dimension flavors

I have got the following error log when I synchronise my grade file in Android Studio (v2.2): Error:(184, 0) Could not get unknown property 'freeAppDev' for ProductFlavor container. Background: I have an app of 2 versions (e.g. freeApp & paidApp)…
2
votes
1 answer

Is there a way to combine data from flavours of different dimensions?

I've made 4 different flavours of the same app and published all of them on Play Store as free apps. Now I'm making a paid version for each of them, and in order to achieve that I've created 2 new flavours: free and paid, and these flavours have a…
2
votes
0 answers

Three flavor dimensions, want to cover two

My Android app has three flavor dimensions. Let's call them Color, Size, and Shape. So I have (Blue|Red)(Small|Large)(Round|Square). Is it possible to have a source folder for blueSmall that covers both blueSmallRound and blueSmallSquare? If I go…
2
votes
2 answers

Android Studio - productFlavor combinations to set version

In my build.gradle, I'm defining 2 different flavor dimensions: //list flavorDimensions in override priority order flavorDimensions 'flavor', 'platform' //assign each productFlavor a corresponding flavorDimension productFlavors { flavor1 { …
2
votes
1 answer

Error:Flavor 'fdroid' has no flavor dimension

I am getting this error like Error: Flavor 'fdroid' has no flavor dimension. after importing the project into Android Studio, please help me I am not changing anything here, it asking flavor dimensions of fdroid I am getting this error like Error:…
sandeep.c
  • 19
  • 3
1
vote
0 answers

A problem occurred configuring project ':app'. when i set multi flavorDimensions

When I use one flavorDimensions, everything is ok. flavorDimensions("aaa")//everything run but when I use multi flavorDimensions and sync project. It sync fail and get the error A problem occurred configuring project ':app'. Does anyone know how…
GHH
  • 1,713
  • 1
  • 8
  • 21
1
2 3