Questions tagged android-productflavors

Explore the latest questions and answers asked by our top developers.

React native android app – Allow debug console with variant

I have a react native app which I was debugging/running in dev by using the ‘react-native run-android’ command. I recently added in flavors for staging + production to allow me to install the versions of the app in parallel. Since doing this however, I can no longer run the app using that same command as […]

By Duncan Palmer
Published
Categorized as android, android-productflavors, debugging, react-native

Android Product Flavors Source Directory Usage

I have a Product Flavor problem and i will explain that problem with example; I have 3 flavor; main, flavor1 and flavor2 And also 3 source directory; src/main/res src/flavor1/res src/flavor2/res For flavor2, if one resource doesnt exist in flavor2 and exists in main and flavor1, android is directly using main resource. But I want to […]

By Emre Karadamar
Published
Categorized as android, android-productflavors, android-studio, kotlin

How to publish multiple flavour of an app as a single app on google play store?

I have these product flavors productFlavors { armv7 { ndk { abiFilters "armeabi-v7a" } ext { abiVersionCode = 1 } } x86 { ndk { abiFilters "x86" } ext { abiVersionCode = 2 } } armv7_SDK23 { ndk { abiFilters "armeabi-v7a" } sourceSets.debug { manifest.srcFile ‘config/debug/AndroidManifest_SDK23.xml’ } sourceSets.release { manifest.srcFile ‘config/release/AndroidManifest_SDK23.xml’ } minSdkVersion 23 ext […]

By sagar dhakal
Published
Categorized as android, android-productflavors, android-studio

Different activities in different flavors android studio

I have the following build.gradle file where i declare the two versions of my project defaultConfig { applicationId "com.company" minSdkVersion 21 targetSdkVersion 31 … } flavorDimensions "version" productFlavors { create("product") { dimension "version" applicationIdSuffix ".product" versionCode 77 versionName "1.11.21470" } create("single_version") { dimension "version" applicationIdSuffix ".product.single_version" versionCode 8 versionName "1.11.21453" } } Now i have […]

How to add flavored local aar to android project?

I have a local library(aar) in my android project. And I need to set the urls in my library according to some conditions. Specifically for US deploy, I want to set the url in US server address. For China deploy, set the url in CN server address. So I tried to use product flavor feature […]

By Scholes
Published
Categorized as aar, android, android-productflavors

The application could not be installed: INSTALL_FAILED_CONFLICTING_PROVIDER

apply plugin: ‘kotlin-android’ android { compileSdk 30 buildToolsVersion "30.0.3" packagingOptions { exclude ‘**/libhermes-inspector.so’ exclude ‘**/libhermes-executor-debug.so’ exclude ‘**/libjscexecutor.so’ } dataBinding { enabled = true } defaultConfig { applicationId "com.a2a.cabsignature" } signingConfigs { debug { } release { keyAlias ‘linc2021’ keyPassword ‘[email protected]@CAB’ storeFile file(‘/Users/firassalaman/Desktop/keystore/Untitled’) storePassword ‘[email protected]@CAB’ } releaseCABSignature { keyAlias ‘SIQ’ keyPassword ‘[email protected]@CAB’ storeFile file(‘/Users/firassalaman/Desktop/SIg’) storePassword ‘[email protected]@CAB’ […]

By Firas Salman
Published
Categorized as android, android-flavors, android-productflavors, gradle

Not change string resource value for flavor

I want to change value of app_name string and other string for paid version of our app,to change app name and widget name for paid version of our app. But it not works for me. Help me please,how i can correct modify string resource value of @string/app_name and other string for paid version of our […]

By Aleksandr Kozlovskiy
Published
Categorized as android, android-productflavors, gradle, java, resources

Product flavour not using correct drawable res

I have a product flavour and I’m naming it the same resource name so that when it’s built, it will use the correct image. The folder structures look something like: main/res/drawable-xhdpi/image.png (etc. has hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi) flavour/res/drawable/image.xml (a vector) So they have the same names. There are PNG versions in the main sourceset […]

By SmallGrammer
Published
Categorized as android, android-productflavors, drawable, vector

How to stop Android Studio accessing Flavor-exclusive classes/resources from Main code?

I have a project with main; composeUi; appcompatUi src folders. I have corresponding composeUi and appcompatUi flavors which of course both rely on sources in main. As you all know, compose and appcompat couldn’t be more different and also, they are alternatives to each other in my app – never co-existing. However, Android Studio will […]

ANDROID – How to apply a different theme to a product flavour?

I’m not very familiar with working with product flavours and applying different themes to them. Basically I’m working on an app that is going to have a reskin to a different set of colours/themes. The codebase should be the same, just the theme/logo is different between them. What’s the best way to go around this? […]

1 2 3 9

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq